[英]Organization Hierarchy using Microsoft Graph
I am looking to work on Organization Chart and related pieces.我正在寻找组织结构图和相关部分的工作。 In order to build the same, I am looking to leverage the Microsoft Graph for data retrieval.
为了构建相同的内容,我希望利用Microsoft Graph进行数据检索。
Question 1问题 1
I don't see a direct endpoint that allows me to pull the entire hierarchy (upwards).我没有看到允许我拉动整个层次结构(向上)的直接端点。 So, is the only option available would require to write a recursive code to pull upwards hierarchy starting at a particular user ie get manager of current user, then get manager of manager and so on until you are done with hierarchy.
因此,唯一可用的选项是需要编写递归代码以从特定用户开始向上拉层次结构,即获取当前用户的经理,然后获取经理的经理等等,直到您完成层次结构。
Question 2问题2
Also, there are other options like Azure AD API.此外,还有其他选项,如 Azure AD API。 However, there is a general recommendation from MS on leveraging the MS Graph endpoint instead of specific product focused endpoints.
但是,MS 提出了关于利用 MS Graph 端点而不是特定产品的端点的一般建议。 Requesting for thoughts on the same.
请求对相同的想法。
Q1: Nope - we don't have this today. Q1:不 - 我们今天没有这个。 Please file a request for this on UserVoice and others can also vote for this feature.
请在UserVoice上提出请求,其他人也可以为此功能投票。
Q2: Whatever is exposed by Azure AD is already exposed in Microsoft Graph with a few exceptions. Q2:Azure AD 公开的任何内容都已在 Microsoft Graph 中公开,但有一些例外。 As such, the recursive manager function doesn't exist there either.
因此,那里也不存在递归管理器功能。 We'd like developers to use Microsoft Graph where possible.
我们希望开发人员尽可能使用 Microsoft Graph。 The future is Microsoft Graph, and if we built such a feature, that would be where we would expose it.
未来是 Microsoft Graph,如果我们构建了这样的功能,我们就会在那里公开它。
Hope this helps,希望这有帮助,
Up-向上-
GET /me/manager
GET /users/{id | userPrincipalName}/manager
Down-下-
GET /me/directReports
GET /users/{id | userPrincipalName}/directReports
Documentation-文档-
https://docs.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http https://docs.microsoft.com/en-us/graph/api/user-list-directreports?view=graph-rest-1.0&tabs=http https://docs.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http https://docs.microsoft.com/en-us/graph/ api/user-list-directreports?view=graph-rest-1.0&tabs=http
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.