c# – 如何使用Microsoft.Azure.ActiveDirectory.GraphClient刪除AzureAD中的使用者管理器
不幸的是,GitHub 提供的示例專案也不包含此功能.
var token = <get your adal token here> var httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var url = "https://graph.windows.net/<tenant domain>/users/<userid>/$links/manager?api-version=1.6" var resp = httpClient.DeleteAsync(url).Result; if (!resp.IsSuccessStatusCode) { // log / throw exception etc. }
http://stackoverflow.com/questions/35754241/how-to-remove-a-users-manager-in-azuread-using-microsoft-azure-activedirectory-g