Deprovision of users using REST API (MS Graph)

Alfio Gennaio 21 Reputation points
2021-07-02T22:27:40.823+00:00

Hello!
I am reaching out seeking developer support for Microsoft 365 / Graph API. Specifically, I need to write some Python code that automates the deprovision of a user. Bottom line, I want to avoid the manual steps and use the API to handle the process.

What I cannot figure out or neither find in the documentation are the following two major tasks.

1) Referring to Exchange Admin Center => User’s Mailbox => Email Apps => Manage email apps settings
Does the Graph API allow the management of the email apps?
Can I disable all the apps for a specific user?

2) Referring to Microsoft 365 Admin Center => Delete user => Giving another user access to [first] [last]’s email.
Does the Graph API allow to delete a user while giving another user access to its email?

Would you please let me know if I can automate steps (1) and (2) below exclusively through REST API calls and where the API references are?

Thanks!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,445 questions
{count} votes

Accepted answer
  1. Vasil Michev 100.2K Reputation points MVP
    2021-07-03T06:12:55.917+00:00

    1) No, the Graph API currently doesnt cover any Exchange Online admin operations. If you need automation, use PowerShell: https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps
    2) As above, no Graph API endpoints for this, use PowerShell.


0 additional answers

Sort by: Most helpful