I am working on Xamarin app that uses MSAL library to authenticate to Web API that is secured by Azure AD. When I run my code in simulator I get this error.
The application cannot access the iOS keychain for the application publisher (the TeamId is null)
_pca = PublicClientApplicationBuilder.Create(ClientID)
.WithIosKeychainSecurityGroup("com.microsoft.adalcache")
.WithRedirectUri(RedirectUri)
.WithAuthority($"https://login.microsoftonline.com/{TenantId}")
.Build();
I already added com.microsoft.adalcache to my Entitlement.plist but I still get the error when debugging.
<dict>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.microsoft.adalcache</string>
</array>
</dict>
CodePudding user response:
I was able to make it work by selecting my Entitlements.pslist in the Custom Entitlements