MSAL.net with AcquireTokenByIntegratedWindowsAuth: MsalClientException with "Integrated Windows Auth

Pablo Glomby 186 Reputation points
2020-12-22T16:40:03.87+00:00

Hi!
I have a C# standalone program and I use MSAL.net with AcquireTokenByIntegratedWindowsAuth and I get this Exception:
MsalClientException - "Integrated Windows Auth is not supported for managed users"

What am I doing wrong?
I took the code from here:
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Integrated-Windows-Authentication

When I login in Windows I enter the good user name like peter@Company portal .com where contoso.com is for Office 365...

I type set in the command prompt and I well get:
USERDOMAIN=AzureAD
USERDOMAIN_ROAMINGPROFILE=AzureAD

Thanks

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,423 questions
0 comments No comments
{count} votes

Accepted answer
  1. JamesTran-MSFT 36,656 Reputation points Microsoft Employee
    2020-12-22T18:32:43.04+00:00

    @Pablo Glomby
    Thank you for your post!

    From the error message that you provided and within the GitHub doc, it states that managed users cannot use this Auth flow.

    50476-image.png

    I hope this helps!
    Thank you for your time and patience throughout this issue.

    ----------

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.