Saa*_*lam 5 azure azure-active-directory azure-ad-graph-api azure-ad-msal azure-authentication
我正在使用 MSAL 使用集成 Windows 身份验证从 Azure 中的身份验证应用程序获取令牌。代码是:
var tenant = $"https://login.microsoftonline.com/<myTenantId>";
var clientId = "<myClientId>";
var scopes = new string[] { "https://graph.microsoft.com/.default" };
var publicApplication = PublicClientApplicationBuilder.Create(clientId).WithAuthority(tenant).Build();
var token = await publicApplication.AcquireTokenByIntegratedWindowsAuth(scopes).ExecuteAsync();
Run Code Online (Sandbox Code Playgroud)
这会引发以下异常:
Integrated Windows Auth is not supported for managed users.
Run Code Online (Sandbox Code Playgroud)
我已按照https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/Integrated-Windows-Authentication中的步骤进行操作,据我所知,我没有错过任何内容。
我的配置中是否遗漏了某些内容?对此的任何帮助都将受到高度赞赏。