Microsoft Graph API – Azure AD Connect – extensionAttribute

huangapple go评论76阅读模式
英文:

Microsoft Graph API - Azure AD Connect - extensionAttribute

问题

当我尝试使用Graph API(混合式Exchange)查询extensionAttribute时,我无法获取任何值。

例如,如果我尝试:https://graph.microsoft.com/v1.0/users/<userid or upn>?$select=extensionAttribute2,即使我知道它存在,我也无法看到该值。

您知道如何正确获取它(或解决方法)吗?

谢谢。

英文:

When I try querying extensionAttribute with Graph API (Hybrid Exchange), I cannot get any value.

E.g., if I try: https://graph.microsoft.com/v1.0/users/<userid or upn>?$select=extensionAttribute2, I cannot see the value even I know it’s there.

Do you know how to get it properly (or a workaround)?

Thank you

答案1

得分: 1

以下是已翻译的内容:

这些值是否与Azure Active Directory同步?AAD用户的所有属性都可以在Microsoft Graph API文档中找到,链接在这里:https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0

听起来这些值是从AAD Connect环境同步的,所以你很可能正在尝试获取onPremisesExtensionAttributes。

根据描述:

包含用户的扩展属性1-15。请注意,这些个别的扩展属性既不可选择也不可过滤。对于启用onPremisesSync的用户,这组属性在本地进行管理且只读。对于仅云用户(其中onPremisesSyncEnabled为false),可以在创建或更新期间设置这些属性。

我建议你仔细查阅有关此事的文档。此外,正如你提到的Exchange,需要注意Exchange的自定义属性与扩展属性相同。有关更多信息,请参阅:https://github.com/microsoftgraph/microsoft-graph-docs/issues/5950

这是一种不同类型的“扩展属性”,但我认为我也应该将这一点包含在答案中。Microsoft Graph有一个不同的可扩展性部分,相关文档可以在这里找到:https://learn.microsoft.com/en-us/graph/extensibility-overview

如果你在这些扩展属性上找到信息,要知道这与本地扩展属性是分开的。

英文:

Are these values synced to Azure Active Directory? All properties for the AAD User can be found in the Microsoft Graph API docs here : https://learn.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0

It sounds like these are being synced from an AAD Connect environment, so it's most likely you are trying to get the onPremisesExtensionAttributes.

Per the description:

> Contains extensionAttributes 1-15 for the user. Note that the individual extension attributes are neither selectable nor filterable. For an onPremisesSyncEnabled user, this set of properties is mastered on-premises and is read-only. For a cloud-only user (where onPremisesSyncEnabled is false), these properties may be set during creation or update.

I suggest taking a look more thoroughly through the documentation in regards to this. In addition to that, as you mentioned Exchange, note that the custom attributes from exchange are the same as the extension attributes. For more info on this see : https://github.com/microsoftgraph/microsoft-graph-docs/issues/5950

This is a separate sort of "Extension Attribute" but I figured I would include this in the answer as well. There is a different extensibility section for the Microsoft Graph, and the docs on this can be found here : https://learn.microsoft.com/en-us/graph/extensibility-overview

If you see information on these extensions, know that this is separate from the on-prem extensions.

huangapple
  • 本文由 发表于 2020年1月6日 23:24:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/59614688.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定