Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

AADSTS50000: There was an error issuing a token or an issue with our sign-in service. #420

Open
GaneshKumarPandithurai opened this issue Jan 4, 2024 · 0 comments

Comments

@GaneshKumarPandithurai
Copy link

Steps to reproduce

$AzureADtenantId = "xxxxxx"
$ClientId = 'xxxxxxx'
[ValidateNotNullOrEmpty()]$Key = 'xxxxxxxxx'
$Key = ConvertTo-SecureString -String $Key -AsPlainText -Force 
$credential = New-Object System.Management.Automation.PSCredential $appId, $Key
$token = New-PartnerAccessToken -ApplicationId $ClientId -Scopes 'https://api.partnercenter.microsoft.com/user_impersonation' -ServicePrincipal -Credential $credential -Tenant  $AzureADtenantId  -UseAuthorizationCode

Expected behavior

It is supposed to store valid token into $token variable.

Actual behavior

Showing below in PowerShell console and launching a browser which shows "AADSTS50000: There was an error issuing a token or an issue with our sign-in service.":

WARNING: Attempting to launch a browser for authorization code login.
WARNING: We have launched a browser for you to login. For the old experience with device code flow, please run 'New-PartnerAccessToken -UseDeviceAuthentication'.

Environment

PowerShell version 5.1.22621.2506
OS: Windows 11 23H2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant