简体   繁体   中英

Delete user's manager in Azure through REST api

I'm able to assign user's manager through REST API using:

 PUT https://graph.windows.net/{userid}/users//$links/manager?api-version=2013-11-08

With body:

Content-Type: application/json
{
 "url": "https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/fabeb27a-0481-4a80-b43e-a5c02c125874"
}

But how can i delete user manager? please help me. Thanks in advance.

Please refer to the offical document references for Azure AD Graph API, as below.

  1. Other navigation properties for user navigation properties
  2. User Entity inherits from DirectoryObject

在此处输入图片说明

According to the above content, you can delete an user's manager via do a DELETE operation for the related directoryObject which be from the response of the operation for assignning user's manager as below.

DELETE https://graph.windows.net/contoso.onmicrosoft.com/directoryObjects/fabeb27a-0481-4a80-b43e-a5c02c125874

For more details, please see the document Delete directoryObject .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM