简体   繁体   中英

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. Each tenant has its own application registration (with different redirect URLs). 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:

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. I assume the app registration creation is executed asynchronously by Azure B2C and eventually it is processed.

Question: how can I make sure that I don't redirect the user to Azure B2C before the new app registration is functional?

This is due to replication delay in the AAD directory layer. Delay your subsequent operation which relies on the App Id by a minute (replication typically occurs within 10sec across region). That gives enough time for the application object to replicate into all the DC's.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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