Resolving "Unknown Apple ID" entries in Xcode Accounts settings

This thread has been locked by a moderator; it no longer accepts new replies.

In Xcode 16, if you use automatic signing to build your app from the command line, you may run into a bug where Xcode repeatedly attempts and fails to migrate invalid developer account credentials. The Accounts settings in Xcode displays an "Unknown Apple ID" entry for each failed attempt. The xcodebuild command logs a message similar to the following text:

IDEDistribution: Failed to log in with account "(null)" while checking for an App Store Connect account (Error Domain=DVTServicesAccountBasedSessionErrorDomain Code=0 "Unable to log in with account ''." 
UserInfo={NSLocalizedFailureReason=Unable to log in with account ''., 
NSLocalizedRecoverySuggestion=The login details for account '' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount: 0x600002390b40; username=''>, 
NSUnderlyingError=0x6000035617d0 {Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." 

The issue is resolved in Xcode 16.1 beta 3. If you use Xcode 16, you can workaround this issue by running the following command in Terminal:

defaults delete com.apple.dt.Xcode DVTDeveloperAccountManagerAppleIDLists

The command removes and signs you out of all your developer accounts on the system.

Boost
Resolving "Unknown Apple ID" entries in Xcode Accounts settings
 
 
Q