Issue: Cross-Tenant OBO with CIAM - Resource Resolved in Wrong Tenant

Parth Jagani 0 Reputation points
2025-12-02T04:02:52.8366667+00:00

Issue: Cross-Tenant OBO with CIAM - Resource Resolved in Wrong Tenant

Problem:

When requesting an access token for a custom API in an internal Azure AD tenant from a CIAM (external) tenant using On-Behalf-Of (OBO), Azure AD resolves the resource in the external tenant instead of the internal tenant, causing AADSTS500207: The account type can't be used for the resource you're trying to access.

Configuration:

  • External tenant: CIAM tenant with a multi-tenant app registration
  • Internal tenant: Azure AD tenant with a multi-tenant app registration exposing a custom API
  • Flow: External users authenticate in CIAM and request tokens for the internal tenant's API

What happens:

  1. User authenticates in CIAM (external tenant)
  2. App requests a token for the internal tenant's API scope (api://{internal-app-id}/access_as_user)
  3. Azure AD resolves the resource in the external tenant instead of the internal tenant
  4. Sign-in logs show:
    • Resource tenant ID = external tenant (incorrect)
    • Resource owner tenant ID = internal tenant (correct)
    • This mismatch causes AADSTS500207

What we've verified:

  • Internal app is multi-tenant
  • External app is authorized in the internal app's "Authorized client applications"
  • Admin consent granted in both tenants
  • API permissions configured correctly
  • Microsoft Graph token acquisition works from CIAM
  • The issue is specific to cross-tenant custom API access

Question:

Is this a known CIAM limitation for cross-tenant OBO? If not, how should we configure the scope or authority so Azure AD resolves the resource in the correct tenant? Are there workarounds or alternative approaches for this scenario?

Additional context:

The internal app's service principal exists in the internal tenant, but Azure AD appears to look for it in the external tenant during token acquisition, suggesting a resource resolution issue in cross-tenant OBO flows with CIAM.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.