question

MohdHaider-0388 avatar image
1 Vote"
MohdHaider-0388 asked RobCaplan edited

MSAL iOS SDK V 1.1.19 giving "The operation couldn’t be completed. (Foundation._GenericObjCError error 0.)" issue sometimes during silent access token refresh.

I am getting this error sometimes when I am trying to access the existing account from SAML iOS SDK.

Error: The operation couldn’t be completed. (Foundation._GenericObjCError error 0.)


I am not sure where I am doing wrong. I can sign in successfully and can perform silent access token refresh also but sometimes I am not getting the current sign-in account.

     let authority = try MSALAuthority(url: “authorise url”)   
     let config = MSALPublicClientApplicationConfig(clientId: “client Id”, redirectUri: nil, authority: authority)   
     self.applicationContext = try MSALPublicClientApplication(configuration: config)   
           
     let loggedAccount = try applicationContext.account(forIdentifier: "accountIdentifier")   

At this place, I am getting a failure sometimes.

Apart from that, I am also getting various other accounts that I have never sign in.

I am using this code:

     let allAccounts = try applicationContext.allAccounts()

This code sometimes giving me accounts that I have never sign in and it does not have my current sign-in account. That leads to silent token refresh failure.

I am using MSAL version 1.1.19 by Cocoapods now.

azure-ad-msal
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It looks like this is an Apple-related issue and may need to go to the Apple forums. https://developer.apple.com/forums/thread/67366

0 Votes 0 ·

0 Answers