Microsoft Graph API 用户自定义属性 [英] Microsoft Graph API User custom property

查看:31
本文介绍了Microsoft Graph API 用户自定义属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过图形 api 访问用户对象的自定义属性.目前,文档显示了可以在 v1.0 的更新用户"部分中访问的属性:http://graph.microsoft.io/docs/api-reference/v1.0/api/user_update .我正在使用此调用来获取当前登录的用户和属性,但我似乎无法让任何自定义属性起作用:

I need to access custom properties on the user object via the graph api. Currently the documentation shows the properties that can be accessed in the "Update User" section of the v1.0: http://graph.microsoft.io/docs/api-reference/v1.0/api/user_update . I'm using this call to get the current logged in user and properties, but I can't seem to get any custom properties to work:

https://graph.microsoft.com/v1.0/me?$select=aboutMe,birthday,city,country,department,displayName,givenName,hireDate,interests,jobTitle,mobilePhone,officeLocation,pastProjects,postalCode,preferredLanguage,preferredName,职责,学校,技能,state,streetAddress,surname,usageLocation,userPrincipalName,userType

我检查了映射回 RefinableString23 的自定义属性之一,但这似乎不起作用.有谁知道是否可以访问自定义属性,如果可以,我可能做错了什么.

I checked on one of our custom properties that maps back to RefinableString23, but that doesn't seem to want to work. Does anyone know if it's even possible to access custom properties and if so what I may be doing wrong.

推荐答案

除了可以对消息、事件和联系人进行扩展外,您还可以通过 Azure AD 扩展用户和组等实体,正如 Marek 所建议的那样(更多最新文档的链接在这里:https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-graph-api-directory-schema-extensions).

As well as the extensions that are possible on messages, events and contacts, you can also extend entities such as users and groups through Azure AD, as Marek was suggesting (link to more up to date doc is here: https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-graph-api-directory-schema-extensions).

可以通过 MS Graph API 查看/更新这些扩展属性值.Microsoft Graph 尚未公开注册新扩展的方法 - 为此您仍需要使用 Azure AD Graph API.

Viewing/updating those extension property values is possible through MS Graph API. Microsoft Graph does not expose a way to register new extensions yet - for that you would still need to use Azure AD Graph API.

希望对你有帮助,

这篇关于Microsoft Graph API 用户自定义属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆