O365 使用 MSAL VDI 的集成 Windows 身份验证(IWA)未加入域问题

问题描述 投票:0回答:0

当我们尝试使用 IWA 接收图形 api 的访问令牌时,我们遇到了一个问题,我们收到一个错误,指出 VDI 未加入域: {“AADSTS53001:设备未处于所需的设备状态:domain_joined。条件访问策略需要加入域的设备,而设备未加入域。}

dsregcmd/status

据我所知,该设备已通过此屏幕截图加入域。如果需要,我可以从 dsregcmd/status 提供更多信息。

试图生成令牌的用户都是联合的。

我们尝试使用的代码:

ApplicationInfo appInfo = new ApplicationInfo()
            {
                ApplicationId = clientId,
                ApplicationName = appName,
                ApplicationVersion = "1.0.0"
            };

 var authorityUri = new Uri(authority);
            authority = String.Format("https://{0}/{1}", authorityUri.Host, tenantId);
 _app = PublicClientApplicationBuilder.Create(_appInfo.ApplicationId).WithAuthority(authority).WithDebugLoggingCallback().WithDefaultRedirectUri().Build();

string[] scopes = new string[] { "https://graph.microsoft.com/.default" };

String accessToken = _app.AcquireTokenByIntegratedWindowsAuth(scopes).ExecuteAsync().Result.AccessToken;
.net azure-devops microsoft-graph-api msal o365-flow
© www.soinside.com 2019 - 2024. All rights reserved.