question

AlfioGennaio-5743 avatar image
0 Votes"
AlfioGennaio-5743 asked saldana-msft edited

Deprovision of users using REST API (MS Graph)

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-mailmicrosoft-graph-users
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AlfioGennaio-5743

Thanks for visiting our forum, and according to your description above, your questions are more related to Graph API. So I would remove the irrelevant tag, and hope your issue can be resolved soon. Thanks for your understanding!

1 Vote 1 ·

1 Answer

michev avatar image
0 Votes"
michev answered AlfioGennaio-5743 commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you very much for the quick response. I appreciated the input. I will consider using PowerShell instead.

0 Votes 0 ·