[英]Azure AD admin consent error for user logging into app registration
[英]Azure AD user login to an app fails even after admin consent is given for the multitenant app
我在 azure 門戶應用程序注冊中注冊了一個示例多租戶應用程序,需要某些權限才能訪問 outlook 郵件。 我還有一個 SAAS 應用程序,它使用此應用程序並請求用戶提供 oauth 令牌,以使用 outlook 閱讀和發送電子郵件。
有一組用戶想要使用我的應用程序在 SAAS 應用程序中配置電子郵件的租戶。 但是租戶中的用戶沒有管理員權限來同意該應用程序。 根據MS 文檔,管理員必須使用 v2-permissions-and-consent 同意應用程序
管理員已使用以下 URL 同意該應用程序:
https://login.microsoftonline.com/{tenant ID}/v2.0/adminconsent?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb&state=12345&redirect_uri=https://c9713e1c5859.ngrok.io/auth/outlook/callback&scope=https://outlook.office .com/User.Read https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send&response_type=code
管理員同意的權限:同意的權限
即使在管理員同意應用程序請求的所有權限並將用戶添加到 Azure AD 中配置的企業應用程序后,用戶在嘗試登錄應用程序時仍會顯示批准提示。
向用戶顯示批准提示:批准提示
理想情況下,一旦應用程序在 Azure AD 企業應用程序中獲得批准,租戶中的所有其他用戶應該能夠在沒有任何同意要求的情況下使用該應用程序。
用戶用來登錄的oauth URL是
誰能幫我理解我在這里缺少什么?
應征得目標租戶管理員同意,然后使用目標租戶登錄。
{tenant ID}
,它應該是目標租戶 ID。 不是您的應用所在的租戶 ID。https://login.microsoftonline.com/{tenant ID}/v2.0/adminconsent?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxb&state=12345&redirect_uri=https://c9713e1c5859.ngrok.io/auth/outlook/callback&scope=https://outlook.office.com/User.Read https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/SMTP.Send&response_type=code
我已經測試過了,然后重現了你的問題。 如果您需要進一步的幫助,請告訴我。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.