使用 Azure AD 同意流时出现空 GUID 错误 [英] Empty GUID error when using Azure AD consent flow
问题描述
我目前正在尝试使用管理员同意流与 Azure AD 集成.
我已经在我们的域中设置了一个应用程序,对其设置了一些权限,然后导航到以下链接:
I'm currently trying to integrate with Azure AD using the admin consent flow.
I've set up an app in our domain, set a few permissions on it and am then navigating to the following link:
https://login.microsoftonline.com/mytestdomain.onmicrosoft.com/oauth2/authorize?client_id=12345678-1234-1234-1234-123456789012&response_type=code&redirect_uri=http://example.com/responsehandler&resource=12345678-1234-1234-1234-123456789012&prompt=admin_consent&state=12345
(这里的一些值已被替换为示例"值)
(Some of the values here have been swapped out for "example" values)
当我导航到那里时,我被要求登录,我使用另一个测试域进行登录,我想将应用程序导入到该域中.
登录后,我看到了应用程序所需的所有权限列表(这似乎是正确的),我单击接受,但随后出现以下错误:
When I navigate there I get asked to sign in, which I do using a different test domain into which I want to import the app.
After signing in I'm shown a list of all the permissions that the app needs (which appear to be correct), I click accept but then I get the following error:
AADSTS90002: Requested tenant identifier '00000000-0000-0000-0000-000000000000' is not valid. Tenant identifiers may not be an empty GUID.
我不确定这个空的 GUID 来自哪里,经过一番搜索后,我找不到任何可能导致它的参考.
I'm not sure where this empty GUID is coming from and after some searching I can't find any reference to what might be causing it.
推荐答案
Daniel Camargo 上面的评论好像成功了.
当我导航到 login.microsoftonline.com 链接时,我正在使用创建域的用户登录.
如果我使用我创建的测试管理员用户登录,它可以正常工作.
Daniel Camargo's comment above seems to have done the trick.
When I navigated to the login.microsoftonline.com link I was logging in with the user that created the domain.
If I log in with a test admin user that I created it works as I'd want.
这篇关于使用 Azure AD 同意流时出现空 GUID 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!