Your session has expired, please login

I log into my Apple Id account under Pref->Account. I AM able to login, it shows me as a team memeber. Then I exit xcode and when I run it, I go to Pref->Account, it says 'Your session has expired, please login'. I can do this over and over.


Thanks

Ralph

I am experiencing the same issue has anyone found a way to fix this?
For Xcode 11 and Big Sur I got an official email from Apple:

From your email I can tell that a possible reason for you seeing this error message is the fact you are on the live version of Xcode and the. Beta version of MacOS. What I would suggest doing is updating the the Xcode version so it will better communicate with the MacOS. Please see the below link for more information on Xcode 12 beta.
Using Big Sur 11.0 Beta (20A5354i). Still, the same error pops up when trying to add an account in Xcode 11.6 but worked fine on Xcode 12 beta. Its not resolved yet. :(
I was trying to upload to appstore but I was facing this error App Store Connect Operation Error Authentication failure. Session is invalid, session has been deleted. So here I just deleted my account from preferences, then i added it again. It has worked fine for me. I am still using catlina and xCode 11.2.x.
Xcode 11.7 didn't solve the problem. Be carful not to try too many times. My AppleID just got locked out and I have to wait 24 hours for it to recover. Apparently, after failing to connect to Authentication Servers, it signals a fault on your Apple ID and causes your account to be locked down. Hoping a new Update for Big Sur solves this problem ASAP.
I want to just confirm that @maria dolores suggestion works for me to. I am running Xcode 11.7 and Xcode 12 beta 6 with MacOS Big Sur.

Here are the steps to follow:
  1. Archive your build using Xcode 11

  2. In Xcode 12, go to Window -> Organizer (You will see your build available there)

  3. Submit your build to AppStore Connect

Hopefully this helps everyone and full credit goes to @maria dolores
Same issue....

Xcode 11.7 (11E801a)
macOS Big Sur 11 beta 6

Thank you for your solution @maria dolores. It worked!
I have faced the same issue on Xcode 11.6 with MacOS Big Sur (11.2)

I have a remedy for what I need. I only needed to build a project that only supports Xcode 11.6 or a previous version.
  1. I build my project on Xcode 11.6

  2. I archived the project on Xcode 11.6

  3. close Xcode 11.6 and open the same project from Xcode 12.4 (Yes I have both Xcode versions installed.)

  4. Windows -> Organizer on Xcode 12.4

  5. Then continue the distribution wizard without any trouble.

I know this is not the answer for all of your situations but hope this will help someone in a similar situation to mine.

whenever I use Xcode on the respective macOS everything works fine (Xcode: 10 on Mojave / 11 on Catalina / 12 on BiSur). The same is not true for me with Xcode 11 on BigSur.
I managed to solve the problem as follows:
  • From an operational Xcode, I exported "Apple ID and Signing Assets..." in Xcode/preferences/accounts.

  • In my Xcode with problems I imported the file. Although the error remains at least now my account appears.

  • I installed Xcode 12 because that is what is supposed to work with BigSur. I logged into my account. I installed my Provisioning Profile and sent one of my apps to one of my devices.

  • I closed Xcode 12. I opened Xcode 11 and although the same login issue comes up, I can choose and use my Provisioning Profile.

  • pure joy

I just had a similar issue and was able to fix following the steps below:

  1. Go to your account in Xcode > Preferences > Accounts.
  2. Add your credentials again.
  3. Everything started working again.

Same problem with Xcode 12.5.1. Above solutions did not work for me. I logged out from my session. After re-login, Xcode got logged w/o having to enter my credentials.

Experiencing this issue with Apple's own Support Forum from iPadOS 15 beta. Log in with fingerprint id, type a message, immediately get a session timeout asking me to "recover" my message, which asks me to log in again, but discards the message I typed. And attempting to type a new message and submit it results in the same session timeout.

Same problem here with Xcode 13.2.1 on Monterey 12.0.1, when I'm trying to Build and Archive from xcodebuild command.. Hope this problem will be resolved quickly..

~(02-03-2022)

Same today Version 13.4.1 (13F100) M1

23/07/2022

Again, same problem Xcode 13.4.1 M1 come on

Yeah. Experienced that also yesterday. Xcode 13.0, monterey 12.3.

Same issue. I cleared xcode authentication tokens from Keychain Access and tried importing my Apple ID from my other macbook but it still keeps showing the "Your session has expired. Please log in." error. Xcode 13.4.1, M1, Monterey 12.3

In my case, logging into my profile on icloud.com helped me. Just log in there to reset the tokens. Also check that in Preferences → Apple ID → Password & Security you have two-factor enabled. After that, the login to the account in XCode was successful.

Logging into iCloud.com didn't work for me, but logging out of my iCloud account on my mac, logging back in, then restarting did the trick for me.

Same problem since yesterday:

  • iMac 24'' M1 2021
  • macOS Monterey 12.4 (updated to 12.5 - no effect)
  • Xcode 13.4.1

Logging out/re-logging into iCloud on my Mac also fails with the message "Invalid username or password" so now I've also lost access to my iCloud work files from my Mac... I can still sign in to icloud.com but that doesn't help.

Also have this problem. Deletead all accounts, trying to add any of them and get "Your session has expired, please login".

[SOLVED] Starting to have the same problem today. I have two user account in my mac mini m1- Monterey 12.5 xcode 13.4.1. I signed out of my second one and used xcode on my primary user account. Started working suddenly. Still cant use xcode in my second user account. Strange!!!

Apple should really look into this!!!

The account has checked various statuses, whether it is https://developer.apple.com/ or https://appstoreconnect.apple.com/ or Developer's app, all are normal and can log in. However, I can't log in in Xcode, as long as I log in, it will prompt "Your session has expired, please login". Finally I solved it:

  1. All of your development team accounts have expired, and you should exit the expired development team first.
  2. You need the non-expired developer team you are in, and enter the appstoreconnect to modify the identity of your account (guess that the account status will be refreshed in the Apple background).
  3. You will find that Xcode can be logged in.

Same issue 3 years later.. come on apple we pay a lot of money for this developer program

Your session has expired, please login
 
 
Q