You can, but you need to pass two sets of tokens, one for the old AAD Graph and one for the Microsoft Graph. I.e.:
Connect-MsolService -AdGraphAccessToken token1 -MsGraphAccessToken token2
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I want to read subscription expiry date for a user using graph API.
The graph api does not expose end dates (as of today), in the documentation : https://learn.microsoft.com/en-us/graph/api/subscribedsku-list?view=graph-rest-1.0&tabs=http
This answer: https://learn.microsoft.com/en-us/answers/questions/518073/is-there-a-way-to-get-license-expiry-and-license-a.html confirms that. The answer also mentions that I can get the subscription end date using Get-MsolSubscription. This commandlet needs the user to input credentials.
Is there any way I can use the graph api access token to access/execute Get-MsolSubscription?
TIA.
You can, but you need to pass two sets of tokens, one for the old AAD Graph and one for the Microsoft Graph. I.e.:
Connect-MsolService -AdGraphAccessToken token1 -MsGraphAccessToken token2