question

HenriqueCarvalho-4095 avatar image
0 Votes"
HenriqueCarvalho-4095 asked DmitriiRazbornov-2193 commented

AzureAD - User Licenses - Reprocess Programmatically

Hi,

I'm assigning O365 Licenses to my users via an AAD Group with License assignment on it.
I noticed that some times, it takes a while for the user to take the license.


The AAD user UI has a "Reprocess " option on licenses tab. How can I do this programmatically?

Note: I know I can do this programmatically at Group level, but since the group has thousands of users, I would prefer to trigger it at user level.

Many thanks,
DD

azure-ad-licensing
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.

1 Answer

vipulsparsh-MSFT avatar image
0 Votes"
vipulsparsh-MSFT answered DmitriiRazbornov-2193 commented

@HenriqueCarvalho-4095 The API used for this is a hidden API and not publicly supported. A browser trace shows that the reprocess options uses following API for the call:

![65217-image.png][1]

API : https://main.iam.ad.ext.azure.com/api/AccountSkus/User/{userID}/Reprocess

You can use that against different users to perform the reprocess via something as PowerShell.






image.png (16.3 KiB)
· 3
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.

@HenriqueCarvalho-4095 I just wanted to check in and see if you had any other questions or if you were able to resolve this issue?

If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.


Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

0 Votes 0 ·
mabdulmoez avatar image mabdulmoez vipulsparsh-MSFT ·

I got this error : Invoke-RestMethod :
401 - Unauthorized: Access is denied due to invalid credentials.
Server Error


401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.


I command I used: Invoke-RestMethod -uri https://main.iam.ad.ext.azure.com/api/AccountSkus/User/USERNAME/Reprocess -Credential $cred

0 Votes 0 ·