繁体   English   中英

如何使用 windows 应用程序为外部用户获取 azure 活动目录令牌

[英]how to get the azure active directory token for the externl user using the windows application

我已将 Gmail 用户添加到 Active Directory。 对于那个用户,我试图获取令牌。正如我在堆栈溢出问题中所问的那样

无法通过传递 gmail 用户的用户名和密码从 azure 活动目录获取令牌

但我未能使用 webapplication 获取令牌。

然后我尝试使用 Microsoft 文档中的 windows 表单应用程序获取令牌

https://github.com/Azure-Samples/active-directory-dotnet-desktop-msgraph-v2

我再次为 gmail 用户获取令牌失败了。 请帮我获取 gmail(外部用户)的令牌。任何人都可以请我来获取令牌。

在示例应用程序(git)的 app.cs 文件中更改

private static string Instance = "https://login.microsoftonline.com/";

private static string Instance = "https://login.microsoftonline.com/{tennant}/oauth2/";

您的代码也适用于外部用户..

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM