Search code examples
.net-6.0maui.net-maui

.Net MAUI Azure AD authentication returns null token


I have implemented the Azure AD authentication as shown in this article, here, but it isn't working. Whenever I use the AzquireTokenInteractive call it returns null. I followed the steps in the article exactly.

Can anyone please advise what is missing or what I have done wrong?


Solution

  • I found the solution to my problem. I removed the WithAuthority as I am logging into our company Azure AD only and no other tenants and I had to ensure that I pass through the scope correctly.