The documentation (https://developer.apple.com/documentation/technotes/tn3147-migrating-to-the-latest-notarization-tool) says: "if your Apple ID only belongs to one team then you don’t need to supply a Team ID."
So I tried:
xcrun notarytool store-credentials "SB_NOTARIZE" --apple-id "my.nameatmycompany.com" --password "mypa-sswo-rd-xxxx"
notarytool then prompted me for my Team ID:
Developer Team ID:
I manually typed the same developer team id into the terminal that I had been providing to notarytool via the argument:
--team-id “12A34B5CD6”
and suddenly notarytool was happy! Previously it failed every single time.
I don't know how notarytool was not able to find my team id without me entering it manually. Hopefully this will work for other people as well, this is a very annoying bug.
Topic:
Code Signing
SubTopic:
Notarization