I have tried using token issued by my own app, but even if it has admin privileges it doesn't seem to be working.
What are the plans to allow Certificate Based Authentication or AppID based Oauth logins. The PowerShell gallery has deploy to azure automation, but how will you manage the prompt. Basic auth isn't something we should be doing as we can see in the workarounds so far.
$oAuthUri = "https://login.microsoftonline.com/$TenantId/oauth2/token"
Is there a way we can directly query the graph endpoint, to get what we need.
$baseUri = "https://licensing.m365.microsoft.com"
$restPath = "$baseUri/v1.0/policies"
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At line:33 char:16
- $response = Invoke-RestMethod `
-
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
- FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
References:
https://www.powershellgallery.com/packages/MSCommerce/1.8
https://docs.microsoft.com/en-us/microsoft-365/commerce/subscriptions/allowselfservicepurchase-powershell?view=o365-worldwide
https://docs.microsoft.com/en-us/microsoft-365/commerce/subscriptions/manage-self-service-purchases-admins?view=o365-worldwide
New connection to MSCommerce · Issue #46 - GitHub
Providing scripted credentials or PSSession ... - GitHub
I have tried using token issued by my own app, but even if it has admin privileges it doesn't seem to be working.
What are the plans to allow Certificate Based Authentication or AppID based Oauth logins. The PowerShell gallery has deploy to azure automation, but how will you manage the prompt. Basic auth isn't something we should be doing as we can see in the workarounds so far.
$oAuthUri = "https://login.microsoftonline.com/$TenantId/oauth2/token"
Is there a way we can directly query the graph endpoint, to get what we need.
$baseUri = "https://licensing.m365.microsoft.com"
$restPath = "$baseUri/v1.0/policies"
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At line:33 char:16
References:
https://www.powershellgallery.com/packages/MSCommerce/1.8
https://docs.microsoft.com/en-us/microsoft-365/commerce/subscriptions/allowselfservicepurchase-powershell?view=o365-worldwide
https://docs.microsoft.com/en-us/microsoft-365/commerce/subscriptions/manage-self-service-purchases-admins?view=o365-worldwide
New connection to MSCommerce · Issue #46 - GitHub
Providing scripted credentials or PSSession ... - GitHub