question

Varun-8136 avatar image
0 Votes"
Varun-8136 asked ·

Creating multi-tenant native mobile application and associated REST API

Hi All,

I have a native Android application which is already registered with a Azure AD B2C tenant, the REST API is registered to the same tenant as well.

But now, the requirements have changed and I also have to allow users in Azure Active Directory tenant to use same application and access same set of APIs that are registered under B2C tenant. My question is, Is there a way to avoid registering the application and the API in the Active Directory tenant all over again, or is there some way to expose these APIs to Active Directory users as well.

Thanks,

azure-active-directoryazure-ad-b2c
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SaurabhSharma-msft avatar image
0 Votes"
SaurabhSharma-msft answered ·

I do not think it is possible to avoid the registration part. You can use custom policies in Azure AD B2C to allow users from multiple Azure AD tenants to sign in using Azure AD B2C but you need to register the application within the organizational Azure AD tenant. You can refer to the Microsoft documentation to achieve the same.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I understand that, but signing in the users from different tenants is not an issue I am facing right now. The main problem is that the API that is going to be accessed by these two different tenants (AD and B2C) is the same resource. But I haven't come across a way to define a resource like a REST API to be accessed by multiple tenants so that the two access tokens authorized by two different tenants can be authorized by the same API.

By the way, I am using Node.js to write my APIs with passport.js as the authentication library.

0 Votes 0 ·