如何在 Azure AD 中查找架构扩展应用程序的 AppId
How to Find AppId of Schema Extention App in Azure AD
我尝试使用 Microsoft graph 获取在 Active Directory 中创建的自定义属性。我可以在 Microsoft Graph
中使用此查询按名称获取属性
https://graph.microsoft.com/v1.0/me?$select=Department
但是我无法使用 Microsoft Graph 获得一些默认情况下(自定义创建的)不是它们的属性。例如,如果我输入 "employeeId",相同的查询 returns
{"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(employeeId)/$entity"}
有趣的是,我可以使用现在已经过时的 Azure AD 图表获取 employeeId。 (查询下方)
https://graph.windows.net/me/employeeId
以上查询returns我下面是Jason
{
"odata.metadata": "https://graph.windows.net/myorganization/$metadata#Edm.String",
"value": "38XXX"}
谷歌搜索后,我发现有一些扩展属性是使用 Azure AD connect 创建的,它将在 Azure 中创建一个 Schema Extension App,我们可以使用它们
extension_{appID}_employeeId
我在我的 Azure 门户中找不到任何架构扩展应用程序,我也尝试了一些 Powershell 命令。我们的组织不使用 Azure B2C AD。我需要的是
- 一种在 Azure 中查找架构扩展应用的 AppId 的方法
- 或者获取这些自定义属性的替代方法
A way to find AppId of Schema Extension App in Azure
如果你想找到 Schema Extension App 的 AppId
,你可以使用下面的 MS 图 api。
GET https://graph.microsoft.com/beta/applications?$filter=displayName eq 'Tenant Schema Extension App'
有关所需权限等的更多详细信息,请参阅此 。
最终,我在 Microsoft Graph Explorer
中的查询下方找到了租户架构扩展 AppID 购买 运行
注意:为图形使用 Beta API 版本
https://graph.microsoft.com/beta/me
返回了一个冗长的 Json,输出如下
"userPrincipalName": "example@abc.com",
"externalUserState": null,
"externalUserStateChangeDateTime": null,
"userType": "Member",
"extension_{appid}_extensionAttribute3": "XXX",
"extension_{appid}_extensionAttribute2": "XXX",
"extension_{appid}_extensionAttribute1": "XXX",
"extension_{appid}_employeeID": "XXXXXX",
此外,即使没有 appid,下面的查询也返回了扩展属性(你应该使用测试版)
https://graph.microsoft.com/beta/me?$select=UserPrincipalName,onPremisesExtensionAttributes
返回以下内容 Json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users(userPrincipalName,onPremisesExtensionAttributes)/$entity",
"userPrincipalName": "xxxx@xxx.com",
"onPremisesExtensionAttributes": {
"extensionAttribute1": "XXX",
"extensionAttribute2": "XXX",
"extensionAttribute3": "XXX",
"extensionAttribute4": null,
"extensionAttribute5": null,
"extensionAttribute6": null,
"extensionAttribute7": null,
"extensionAttribute8": null,
"extensionAttribute9": null,
"extensionAttribute10": null,
"extensionAttribute11": null,
"extensionAttribute12": null,
"extensionAttribute13": null,
"extensionAttribute14": null,
"extensionAttribute15": null
}
}
我尝试使用 Microsoft graph 获取在 Active Directory 中创建的自定义属性。我可以在 Microsoft Graph
中使用此查询按名称获取属性https://graph.microsoft.com/v1.0/me?$select=Department
但是我无法使用 Microsoft Graph 获得一些默认情况下(自定义创建的)不是它们的属性。例如,如果我输入 "employeeId",相同的查询 returns
{"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(employeeId)/$entity"}
有趣的是,我可以使用现在已经过时的 Azure AD 图表获取 employeeId。 (查询下方)
https://graph.windows.net/me/employeeId
以上查询returns我下面是Jason
{
"odata.metadata": "https://graph.windows.net/myorganization/$metadata#Edm.String",
"value": "38XXX"}
谷歌搜索后,我发现有一些扩展属性是使用 Azure AD connect 创建的,它将在 Azure 中创建一个 Schema Extension App,我们可以使用它们
extension_{appID}_employeeId
我在我的 Azure 门户中找不到任何架构扩展应用程序,我也尝试了一些 Powershell 命令。我们的组织不使用 Azure B2C AD。我需要的是
- 一种在 Azure 中查找架构扩展应用的 AppId 的方法
- 或者获取这些自定义属性的替代方法
A way to find AppId of Schema Extension App in Azure
如果你想找到 Schema Extension App 的 AppId
,你可以使用下面的 MS 图 api。
GET https://graph.microsoft.com/beta/applications?$filter=displayName eq 'Tenant Schema Extension App'
有关所需权限等的更多详细信息,请参阅此
最终,我在 Microsoft Graph Explorer
中的查询下方找到了租户架构扩展 AppID 购买 运行注意:为图形使用 Beta API 版本
https://graph.microsoft.com/beta/me
返回了一个冗长的 Json,输出如下
"userPrincipalName": "example@abc.com",
"externalUserState": null,
"externalUserStateChangeDateTime": null,
"userType": "Member",
"extension_{appid}_extensionAttribute3": "XXX",
"extension_{appid}_extensionAttribute2": "XXX",
"extension_{appid}_extensionAttribute1": "XXX",
"extension_{appid}_employeeID": "XXXXXX",
此外,即使没有 appid,下面的查询也返回了扩展属性(你应该使用测试版)
https://graph.microsoft.com/beta/me?$select=UserPrincipalName,onPremisesExtensionAttributes
返回以下内容 Json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users(userPrincipalName,onPremisesExtensionAttributes)/$entity",
"userPrincipalName": "xxxx@xxx.com",
"onPremisesExtensionAttributes": {
"extensionAttribute1": "XXX",
"extensionAttribute2": "XXX",
"extensionAttribute3": "XXX",
"extensionAttribute4": null,
"extensionAttribute5": null,
"extensionAttribute6": null,
"extensionAttribute7": null,
"extensionAttribute8": null,
"extensionAttribute9": null,
"extensionAttribute10": null,
"extensionAttribute11": null,
"extensionAttribute12": null,
"extensionAttribute13": null,
"extensionAttribute14": null,
"extensionAttribute15": null
}
}