Question regarding Azure Active Directory tenant restriction

M C 1 Reputation point
2021-05-31T18:02:17.387+00:00

Hi,

For directory ID used for Restrict-Access-Context or Restrict-Access-To-Tenants, is it always fixed size of 36 characters in same format like "456ff232-35l2-5h23-b3b3-3236w0826f3d" (including location of dashes)?

Thanks!

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,262 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,551 Reputation points
    2021-06-01T05:49:52.407+00:00

    Hi @M C · Thank you for reaching out.

    The value of Restrict-Access-Context or Restrict-Access-To-Tenants can be either tenant/directory ID like "456ff232-35l2-5h23-b3b3-3236w0826f3d" (including location of dashes) as you have mentioned or tenant/directory name like tenant_name.onmicrosoft.com. You can specify multiple tenants by using ID or name separated by a comma.

    I have tested setting the value of Restrict-Access-To-Tenants = tenant1.onmicrosoft.com,tenant2.onmicrosoft.com and it works perfectly fine. I am only restricted to tenant1 and tenant2, and cannot access tenant3 as expected.

    -----------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


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.