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

Cannot retrieve ExchangeOnline Access Token using Refresh Token #268

Closed
protocolist opened this issue Jan 24, 2020 · 3 comments
Closed

Cannot retrieve ExchangeOnline Access Token using Refresh Token #268

protocolist opened this issue Jan 24, 2020 · 3 comments

Comments

@protocolist
Copy link

Steps to reproduce

The issue is similar to #254

Run the command to exchange a refresh token for an access token as per microsoft documentation here, after first getting the refresh token:

$token = New-PartnerAccessToken -Module ExchangeOnline -RefreshToken $token.RefreshToken -Tenant $customerId

Expected behavior

An object with an Access Token is returned

Actual behavior

Powershell requests a scope

$token = New-PartnerAccessToken -Module ExchangeOnline -RefreshToken $token.RefreshToken -Tenant $customerId

cmdlet New-PartnerAccessToken at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
Scopes[0]:

Diagnostic logs

Environment

PartnerCenter 3.0.5
PSVersion 5.1.17763.771

@ghost
Copy link

ghost commented Jan 24, 2020

@protocolist thank you for sharing this with us. This particular issue will be addressed with the upcoming release. You can work around it by specifying a random value for the scopes parameter. Right now the plan is to have version 3.0.6 release by the end of next week at the latest.

@protocolist
Copy link
Author

@IsaiahWilliams Thanks for the update and workaround. If I specify a random value for the scopes parameter, I am still unable to continue and am met with the following:

New-PartnerAccessToken : No ClientId was specified.
At line:1 char:10
+ $token = New-PartnerAccessToken -Module ExchangeOnline -RefreshToken  ...
+          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-PartnerAccessToken], MsalClientException
    + FullyQualifiedErrorId : Microsoft.Store.PartnerCenter.PowerShell.Commands.NewPartnerAccessToken

Should this be raised as a new bug?

@ghost
Copy link

ghost commented Jan 29, 2020

@protocolist the required code changes have been made. This will be officially addressed in version 3.0.6 which is scheduled to be released by tomorrow

@ghost ghost closed this as completed Jan 29, 2020
This issue was closed.
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