1
votes

I wanted to ask if there is an API I can use the ADAL SDK for Android and IOS to get the tenant name that of the sign in user (by its tenant id)

also in B2B solution, I can get a token to an external tenant id (i was invited to) if I got the external tenant id - can I get its name?

1

1 Answers

0
votes

There’s no claim in an AAD/ADFS token [that I’m aware of] which expresses the String name of your tenant. This information is available from the Microsoft Graph (docs) using the displayName field below.

GET https://graph.microsoft.com/v1.0/organization

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 411

{
  "assignedPlans": [
    {
      "assignedDateTime": "datetime-value",
      "capabilityStatus": "capabilityStatus-value",
      "service": "service-value",
      "servicePlanId": "servicePlanId-value"
    }
  ],
  "businessPhones": [
    "businessPhones-value"
  ],
  "city": "city-value",
  "country": "country-value",
  "countryLetterCode": "countryLetterCode-value",
  "displayName": "displayName-value" <-- This is your tenant name
}