简体   繁体   English

Azure AD B2C - 创建应用注册后立即出现错误 AADB2C90018

[英]Azure AD B2C - Error AADB2C90018 immediately after the app registration was created

I have a multitenant application and I use Azure B2C as an identity provider.我有一个多租户应用程序,我使用 Azure B2C 作为身份提供者。 Each tenant has its own application registration (with different redirect URLs).每个租户都有自己的应用程序注册(具有不同的重定向 URL)。 The application registrations are created programmatically at tenant creation.应用程序注册是在租户创建时以编程方式创建的。

Immediately after the creation, Azure B2C gets the following error when I redirect an user to the login page:创建后,当我将用户重定向到登录页面时,Azure B2C 立即收到以下错误:

AADB2C90018: The client id '<just-created-app-id>' specified in the request is not registered in tenant '<my-tenant>'.

After few seconds, the same URL will work as expected.几秒钟后,相同的 URL 将按预期工作。 I assume the app registration creation is executed asynchronously by Azure B2C and eventually it is processed.我假设应用程序注册创建是由 Azure B2C 异步执行的,并最终被处理。

Question: how can I make sure that I don't redirect the user to Azure B2C before the new app registration is functional?问题:如何确保在新应用注册功能正常之前不会将用户重定向到 Azure B2C?

This is due to replication delay in the AAD directory layer.这是由于 AAD 目录层中的复制延迟。 Delay your subsequent operation which relies on the App Id by a minute (replication typically occurs within 10sec across region).将依赖 App Id 的后续操作延迟一分钟(复制通常在跨区域的 10 秒内发生)。 That gives enough time for the application object to replicate into all the DC's.这为应用程序 object 复制到所有 DC 提供了足够的时间。

https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-architecture#azure-ad-architecture https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-architecture#azure-ad-architecture

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

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