Finding Azure AD Schema Extension AppId in Microso

2019-07-24 14:33发布

问题:

If one synchronizes custom attributes via Azure AD Connect, schema extensions are made to Azure AD and there is an associated application made in Azure AD with a DisplayName of "Tenant Schema Extension App".

Unfortunately, these extensions are uniquely named, as well with extension_AppIdGuid_attributeName.

With the Azure AD PowerShell module, it is easy enough to find this:

$ExtensionGuid = ((Get-AzureADApplication | 
    Where-Object {$_.DisplayName -eq "Tenant Schema Extension App"}).AppId).Replace("-","")

These can also be queried within the Microsoft Graph. However, I cannot find a mechanism within the Microsoft Graph to find what the AppId is.

I have queried:

  • /organization
  • /schemaExtensions
  • /$metadata

The Azure AD Graph seems to have the capability, but it is going away and the Microsoft Graph is the future. I want it there. Any help is appreciated.

回答1:

You can find the Tenant Schema Extension app in Microsoft Graph via the following query:

https://graph.microsoft.com/beta/applications?$filter=displayName eq 'Tenant Schema Extension App'

Unlike the Azure AD Graph which Application object which has an id and an appId, the Microsoft Graph Application object only has an id property which corresponds to the appId value in the Azure AD Graph.

Note: As per the Microsoft Graph documentation for GET /applications you require any the following permissions:

  • Delegated (work or school account): Directory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All
  • Application: Directory.Read.All, Directory.ReadWrite.All