Reputation: 616
I have a task to delete a user/update user attributes in the azure active directory using Python.
I searched and couldn't find any solution to do it.
Upvotes: 1
Views: 680
Reputation: 42063
To delete the user and update user attributes, you could call the Microsoft Graph API in python.
DELETE https://graph.microsoft.com/v1.0/users/{user-id}
PATCH https://graph.microsoft.com/v1.0/me
Content-type: application/json
{
"businessPhones": [
"businessPhones-value"
],
"officeLocation": "city-value"
}
To call Microsoft Graph in python, just refer to this link, sample code here.
Upvotes: 1