An Albany man has admitted to attempted criminal sale of a firearm — and his customers were undercover officers.