[Bug] MSAL NuGet package needs an rd.xml to work correctly in UWP apps
See original GitHub issueWhich Version of MSAL are you using ? MSAL 4.8.1
Platform UWP
What authentication flow has the issue?
- Desktop / Mobile
- Interactive
Is this a new or existing app? a. The app is in production, and I have upgraded to a new version of MSAL
Repro Create a UWP app project in VS 2019. Add auth to it, as per https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-windows-uwp
Enable .NET Native compilation and run the app. Sign-in will throw an exception with the following error message: Authorize endpoint was not found in the openid configuration
Expected behavior Auth should work.
Actual behavior Exception is thrown.
Possible Solution
You should ship an rd.xml containing the following directive (or similar):
<Assembly Name="Microsoft.Identity.Client" Dynamic="Required All" />
cf https://devblogs.microsoft.com/dotnet/net-native-deep-dive-making-your-library-great/
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
@bgavrilMS: here’s a repro.
Build in x64 debug and observe that you can sign in by clicking on the
Log in
button.Then build x64 release and try again. Instead of a successful login, the library will throw
Microsoft.Identity.Client.MsalClientException
:client info is null
MsalDotNetNative.zip
Please note that you will need to set your own client id and redirect id in MainPage.xaml.cs
Thanks.
@mfeingol, thank you for reporting this bug. I spent over a week trying to fix this and would never have thought to modify the rd.xml file. I made your suggested change and it now works.