[Bug] PlatformNotSupportedException in macOS App
See original GitHub issueWhich Version of MSAL are you using ? MSAL 4.23.0 MSAL Extensions 2.16.5
Platform Xamarin.macOS
Is this a new or existing app? a. The app is in production, and I have upgraded to a new version of MSAL
Repro
var storageProperties = new StorageCreationPropertiesBuilder("msal_cache.dat", Environment.GetFolderPath(Environment.SpecialFolder.Personal), ClientId)
.WithMacKeyChain(Foundation.NSBundle.MainBundle.BundleIdentifier, "msal_account")
.Build();
var cacheHelper = await MsalCacheHelper.CreateAsync(storageProperties).ConfigureAwait(false);
cacheHelper.RegisterCache(pca.UserTokenCache);
Expected behavior After updating MSAL to 4.2.30 I get a PlatformNotSupportedException when trying to add a token cache which is being thrown here: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/79b57039a076391fe350a736fe9c951322fdd422/src/client/Microsoft.Identity.Client/TokenCache.Notifications.cs#L156-L164
Actual behavior No exception when adding custom token cache
Additional context/ Logs / Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why do I get the Error "Unhandled exception. System. ...
I try get the text from a Word document, but it will always show me the error. I am using .Net 7.0 and...
Read more >Security - PlatformNotSupportedException (Operation is ...
Running the iOS project from vs 2019 on pc. I am using E4098 to connect the Xamarin app to the XPO/XAF back-end. This...
Read more >System.PlatformNotSupportedException
I use Linux Mint 21 and Visual Studio Code. The thing is that when coding a console app I tried to use this...
Read more >Mac OS, Linux - .NET Core 3.0 reporting application failed ...
Mac OS, Linux - .NET Core 3.0 reporting application failed with 'PlatformNotSupportedException: System.Windows.Extensions types are not ...
Read more >HttpClientHandler Proxy Unsupported - Microsoft Q&A
In the MacOS, Proxy member in HttpClientHandler throw exception "Operation is not supported on this platform." In code is marked
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ack, please stay on MSAL 4.22 for now. Will get this shipped in 1-2 weeks.
For reference, we’re also using this on Xamarin.Mac in order to use the macOS keychain as the token cache.
Without this, iOS uses the keychain, but macOS does not.