Office 365 API - Creating New User, Getting Licensing Information; Which API to use?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Office 365 API - Creating New User, Getting Licensing Information; Which API to use?

Message par ForumBot »

Office 365 API - Creating New User, Getting Licensing Information; Which API to use?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Office 365 API - Creating New User, Getting Licensing Information; Which API to use?

Message par ForumBot »

You should use the Microsoft Graph API for this, which could be used in native apps and web applications. There are several examples available on connecting to the Microsoft Graph.
The API reference could be found here: [http://graph.microsoft.io](http://graph.microsoft.io)

Or try the Graph Explorer to try the API: [https://graphexplorer2.azurewebsites.net](https://graphexplorer2.azurewebsites.net)

**To retrieve users with assigned licenses:**

First get the subscribed Skus from your tenant using:
[https://graph.windows.net/rbd3v.onmicrosoft.com/subscribedSkus](https://graph.windows.net/rbd3v.onmicrosoft.com/subscribedSkus)
(Where rbd3v.onmicrosoft.com should be replaced with your tenant)

Next you could retrieve all users with the assigned licenses:
[https://graph.windows.net/rbd3v.onmicrosoft.com/users](https://graph.windows.net/rbd3v.onmicrosoft.com/users)

Which will return something like this:

The SkuId of ‘assignedlicenses’ will match a license retrieved from the first request.

**Get list of mail boxes**

The same way you could retrieve all the mailboxes.
By retrieving all the users and groups in your tenant and extract their email address.
For an overview of available requests check:
[https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/api-catalog](https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/api-catalog)

Hope this will help you!
Répondre

Revenir à « Excel & VBA »