簡體   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