$expand=manager does not expand manager

谁都会走 提交于 2020-03-05 07:03:49

问题


When testing https://graph.microsoft.com/v1.0/users/<my-email>/manager, I receive the following response (I replaced values with "HIDDEN"):

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects/$entity",
    "@odata.type": "#microsoft.graph.user",
    "id": HIDDEN,
    "businessPhones": [
        HIDDEN
    ],
    "displayName": HIDDEN,
    "givenName": HIDDEN,
    "jobTitle": "Director, Information Technology",
    "mail": HIDDEN,
    "mobilePhone": HIDDEN,
    "officeLocation": HIDDEN,
    "preferredLanguage": null,
    "surname": HIDDEN,
    "userPrincipalName": HIDDEN
}

Clearly it works. But when I try the same URI using $expand instead, it doesn't show the manager:

URI: https://graph.microsoft.com/v1.0/users/<my-email>?$expand=manager

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
    "businessPhones": [
        HIDDEN
    ],
    "displayName": "Yousef Shanawany",
    "givenName": "Yousef",
    "jobTitle": "Developer, Application",
    "mail": HIDDEN,
    "mobilePhone": null,
    "officeLocation": "US California San Jose America Center",
    "preferredLanguage": null,
    "surname": "Shanawany",
    "userPrincipalName": HIDDEN,
    "id": HIDDEN
}

How can I get my manager using the $expand parameter in MS Graph?


回答1:


I believe this works in beta today. Try GET https://graph.microsoft.com/beta/me?$expand=manager



来源:https://stackoverflow.com/questions/56365656/expand-manager-does-not-expand-manager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!