if the app is displaying the login dialog with no errors, then most likely you have not defined a scope for api access. you api registration needs a scope defined for access, and your login should include this scope.
How to resolve 401 Unauthorized Error for API calls from UWP application using MSAL token
Sushma Sharani
0
Reputation points
We have an UWP application for which we are using ADAL Authentication process . But we are migrating it to MSAL. We have followed the code implementation for our application as suggested in the below link
Post our authentication , we are calling web APIs which are hosted in Azure APIM and the code development is handled in a different Project.
While calling the API , we are passing the token with "Authorization header through the HttpClient" object and in Response we are getting 401 "Unauthorized".
Microsoft Security Microsoft Entra Microsoft Entra ID
25,081 questions
Developer technologies C#
11,567 questions
1 answer
Sort by: Most helpful
-
Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
2023-07-31T17:43:35.18+00:00