0
votes

I have gone through the documentation on how to manage access to resources with Azure active directory groups. I need to create and manage users, groups, roles to access office 365 resources. But I need to do these admin activities using API's (not using Azure admin portal).
Can anyone please suggest me where I can find and explore these API's.

Why I need to use API instead of UI? : I own a cloud-orchestration website where I can provide access to office 365 resources like outlook, sharepoint, powerpoint etc., for my organization's users. User logs-in and make request to access outlook & powerpoint. At this time, I review the request and perform the following actions (Microsoft's API's will perform these actions behind the scene)

1. Create the user (Office 365 graph api is available to create user) and
2. Buy license on-demand (is there any graph api available to purchase license) or apply already purchased license to the user (but only to outlook & powerpoint).
3. If already existing license provides access also for onenote, I should be able to provide access only to outlook & powerpoint.

Kindly provide me the link to start exploring these api's.

1

1 Answers

1
votes
  1. Buy license on-demand (is there any graph api available to purchase license) or apply already purchased license to the user (but only to outlook & powerpoint).

At present, the Microsoft Graph REST doesn't support to purchase service. However, you can assign the licences to users using the Microsoft Graph API. Here is an example for your reference:

POST https://graph.microsoft.com/v1.0/me/assignLicense
Content-type: application/json
Content-length: 185

{
  "addLicenses": [
    {
      "disabledPlans": [ "11b0131d-43c8-4bbb-b2c8-e80f9a50834a" ],
      "skuId": "skuId-value"
    }
  ],
  "removeLicenses": [ "bea13e0c-3828-4daa-a392-28af7ff61a0f" ]
}

And if you want to disable the specific disabledPlans property to disable plans associated with a license.

More detail refer to here.