'AADSTS500207: The account type can't be used for the resource you're trying to access' error when trying to access custom scope in an External Tenant

Sam Anson 20 Reputation points
2024-07-03T14:32:57.8966667+00:00

Hello,

I am having issues when trying to sign into my External tenant and specifying a custom scope. The error happens when I am making use of the MSAL library but also when attempting to authenticate with Postman or Insomnia.

I have set my authority to be https://{domain-name}.ciamlogin.com/ and when attempting to sign in with an external user in that tenant and specifying one of the scopes to be a custom scope that I have defined, it returns the AADSTS500207 error. If I don't specify this scope and only specify standard MS Graph scopes such as openid & offline_access, it logs in fine however I require this custom scope for authentication to my own api.

I have configured the application ID url to be api://... and I have included the full path in the scope however it fails regardless. If I don't include the full path and just include the name of the scope itself, I get another error stating the scope could not be found.

I have also attempted trying to sign in with an internal account however it states that my email cannot be found as I am trying to use this as public client.

Any help would be greatly appreciated as currently.

Kind Regards,

Sam

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

2 answers

Sort by: Most helpful
  1. Drew Trafton 5 Reputation points
    2024-09-09T13:14:39.1466667+00:00

    I was wrestling with this for quite some time, and found that if my API application was configured as single-tenant everything worked as expected. Still testing, but I believe that this should accomplish my goals as the client Entra application through which users can generate a token is still set up as multi-tenant and therefore should allow access to guest users.

    1 person found this answer helpful.

  2. Cristian Carrion 1 Reputation point
    2025-02-24T15:38:42.45+00:00

    Hi, you resolved this issue? a have the same problem, my application is multitenant and the api is configured -- Any Microsoft Entra ID tenant - Multitenant

    And app front SPA is multitenant too.


Your answer

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