Azure-Samples / ms-identity-mobile-apple-swift-objc

An iOS sample in Swift that authenticates Microsoft Account and Azure AD users and calls the Graph API using OAuth 2.0
https://aka.ms/aaddev
74 stars 37 forks source link

MSALErrorDomain error-5000 #87

Closed xiaochuan4938 closed 1 year ago

xiaochuan4938 commented 1 year ago

Some times user with Outlook or Skype installed in their devices get into this error "The operation couldn't be completed (MSALErrorDomain error -5000)".

image
jasoncoolmax commented 1 year ago

Hi @xiaochuan4938, -50000 is MSALErrorInternal. Could you please provide the MSAL logs such that I can help investigate? Thank you!

xiaochuan4938 commented 1 year ago

Error Domain=MSALErrorDomain Code=-50000 "(null)" UserInfo={MSALErrorDescriptionKey=Only one interactive session is allowed at a time., MSALInternalErrorCodeKey=-42402, MSALCorrelationIDKey=EF0E0F78-758C-4293-8A1E-37CDA1C0C579} . Now I'm tryna call [MSALPublicClientApplication cancelCurrentWebAuthSession] before initiating a new interactive token request. hope it works. @jasoncoolmax

jasoncoolmax commented 1 year ago

Yes, the error code means that the previous interactive call is not finished yet. You should either wait for user to finish the interaction, or cancel it programmatically.

Rigavinil201 commented 1 year ago

None