I'm an Office 365 user and I'm writing applications that use Azure AD to authenticate against. In all the examples I find, the tenant name they are using is a friendly name like onmicrosoft.com or domain.com. The tenant name I have to work with though is a guid.
Is there any way to change this? Doing things like calling the graph api just doesn't look right: https://graph.windows.net/12345678-aaaa-bbbb-cccc-dddddddddddd/groups?api-version=1.6
An Azure AD tenant is a reserved Azure AD service instance that an organization receives and owns once it signs up for a Microsoft cloud service such as Azure, Microsoft Intune, or Microsoft 365. Each tenant represents an organization, and is distinct and separate from other Azure AD tenants.
Unfortunately, you cannot rename Azure tenant. However, you can create a new tenant with desired name (if the name is available and not already taken by someone else) and then transfer your pay-as-you-go subscription to the new tenant.
Note: The Tenant ID and Directory ID are the same.
A directory is the Azure AD service. Each directory has one or more domains. A directory can have many subscriptions associated with it, but only one tenant. A domain (or accepted domain) is a DNS zone for which a tenant has proven ownership (by creating an arbitrarily named DNS record as requested by Microsoft).
You can qualify endpoint URLs with both a registered domain for the tenant (the default <tenant>.onmicrosoft.com and any other domain you registered under the tenant) and the tenantID, which comes in GUID format. Both approaches will yield the same result, the only difference is that the tenantID is more stable (guaranteed non reassignable).
You just need to find out what is one of the domains associated to your tenant - that should be visible in the UX when you perform an authentication - and instantiate it in the URL in lieu of the tenantID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With