我试图复制下面的示例https://github.com/Azure-Samples/active-directory-dotnet-windows-store(一个Windows商店应用程序对azure AD进行身份验证),但我用Azure函数替换Web应用程序。Windows商店应用程序进行天蓝色功能验证
在功能,代码检查用户是否登录如下:
ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/scope").Value.Contains("user_impersonation"))
但这并不包含所需的值,以及其他调用不返回任何值,或者(如ClaimsPrincipal .Current.FindFirst(ClaimTypes.GivenName));
你知道发生了什么吗?