MSCloudLoginAssistant
MSCloudLoginAssistant copied to clipboard
New connection to MSCommerce
The current implementation of the MSCommerce module does not allow to pass credentials into Connect-MSCommerce
cmdLet. The module is used to change the self service licensing options within PowerPlatform.
The implementation could be very similar to Get-PowerPlatformTokenInfo
:
$ClientId = "3d5cffa9-04da-4657-8cab-c7f074657cad"
$Resource = "aeb86249-8ea3-49e2-900b-54cc8e308f85" # Licensemanager API
$O365Credentials
Import-Module 'Microsoft.PowerApps.Administration.PowerShell' -Force
$authContext = New-Object Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext("https://login.windows.net/common");
$credential = [Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential]::new($O365Credentials.Username, $O365Credentials.Password)
$token = $authContext.AcquireToken($Resource, $ClientId, $O365Credentials)