Apple Developer Account: Individual - error 'There was an error while trying to log in: Provide a properly configured and signed bearer token, and make sure that it has not expired learn more about generating tokens for API requests'

Brian Kekana 26 Reputation points
2022-11-22T08:48:18.217+00:00

I have an issue when trying to sign in with my apple developer account on visual studio 2022 (v17.4.1). Firstly, I when trying to sign in as an 'individual account' I get this error ‘there was an error while loading your certificates: The Apple Developer Portal only supports Enterprise accounts. Remove your account and re-add it as an 'individual' account and then try again'. Secondly when when trying to sign in as an 'enterprise account' I get this error 'there was an error while trying to log in: Provide a properly configured and signed bearer token, and make sure that it has not expired learn more about generating tokens for API requests'.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,363 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,221 questions
{count} vote

6 answers

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 32,781 Reputation points Microsoft Vendor
    2022-11-22T09:31:06.39+00:00

    Hello @Brian Kekana ,

    Your Apple developer account is an Individual account, you have to generate an API Key, which is an Apple update.

    About how to generate an API Key, you can follow the steps blew: Go to App Store Connect, click User and Access, go to Keys tab, choose App Store Connect API , then generate an API Key. After that, you can open VS and go to Tools-> Options-> Xamarin-> Apple Accounts -> Add-> Individual account, enter your API key.
    (Note: Please be careful to save the downloaded key, it can only be downloaded once.)

    For more details, you can see Creating API Keys for App Store Connect API on developer.apple.com.

    After that, you can click View Details to load the certificates and Provisioning Profiles.

    Best Regards,
    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. gf 0 Reputation points
    2023-07-03T08:11:53.8433333+00:00

    Hi,

    I ran into the same problem. Reason was a wrong issuer ID.

    Issuer ID is also shown on the top of the Keys Tab

    Maybe it helps


  3. Michael Hamilton 0 Reputation points
    2023-08-04T22:05:29.0233333+00:00

    For me I had the same issue, everything worked ok when I put in my own name of my account into visual studio instead of the name of the Api key.


  4. Brett Whittaker 5 Reputation points
    2023-08-31T20:44:21.58+00:00

    These are the error logs generated when I enter my correct information for my Individual account:

    Xamarin.Messaging.IDB.AppleProvisioningManager Error: 0 : Xamarin.MacDev.AppleSigning.AppleServerException: Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens
       at Xamarin.MacDev.AppleSigning.AppStoreDeveloperPortal.<ViewDeveloper>d__49.MoveNext() in /Users/builder/azdo/_work/1/s/External/maciostools/Xamarin.MacDev.AppleSigning/AppleDeveloperPortal/AppStoreDeveloperPortal.cs:line 984
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Xamarin.MacDev.AppleSigning.SyncDeveloperInfo.<Run>d__8.MoveNext() in /Users/builder/azdo/_work/1/s/External/maciostools/Xamarin.MacDev.AppleSigning/ProvisioningTasks/SyncDeveloperInfo.cs:line 53
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Xamarin.MacDev.AppleSigning.SyncDeveloperAccountData`1.<Run>d__17.MoveNext() in /Users/builder/azdo/_work/1/s/External/maciostools/Xamarin.MacDev.AppleSigning/ProvisioningTasks/SyncDeveloperAccountData.cs:line 62
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Xamarin.Messaging.IDB.AppleProvisioningManager.<GetUpdatedAccountAsync>d__13.MoveNext() in D:\a\_work\1\s\src\Messaging\Xamarin.Messaging.IDB.Local\AppleProvisioningManager.cs:line 107: 08/31/2023 20:26:34Z
        DateTime=2023-08-31T20:26:34.4799044Z: 08/31/2023 20:26:34Z
    
    0 comments No comments

  5. Sibalik, Mike 11 Reputation points
    2024-11-14T16:12:30.6633333+00:00

    I was able to add an App Store Connect API key on the Integrations tab on the Users and Access page in App Store Connect. I was following the instructions at https://zcusa.951200.xyz/en-us/dotnet/maui/ios/apple-account-management?view=net-maui-8.0 which apparently is already out of date. It doesn't mention or show in the images that there are now separate sub-tabs for Team Keys and Individual Keys. I took a guess and generated a team key.

    When I tried to add an Enterprise Account in Visual studio, I got the error reported in this thread. Oddly, Visual Studio will let me create an individual account using the Team Key I generated, but of course, I don't see my enterprise group.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.