Open jameskirsop opened 3 years ago
I came across this today when trying to run the module (3.0.10) pwsh from a container. I've tried various version of linux and powershell and the previous version of the module they all return a null RefreshToken. I need to track down a windows laptop as I don't have that as an OS in my CI. I don't suppose anyone knows how to achieve the same thing in postman or curl instead?
if anyone happens to come across this issue stuck with the same problem, here is the curl request I'm now using to generate the token...
/usr/bin/curl --location "https://login.microsoftonline.com/$($JSON.tenantId)/oauth2/v2.0/token" --request POST `
--header 'return-client-request-id: true' `
--header 'Accept: application/json' `
--header 'Content-Type: application/x-www-form-urlencoded' `
--data-urlencode "client_id=$($JSON.clientId)" `
--data-urlencode 'client_info=1' `
--data-urlencode "client_secret=$($JSON.clientSecret)" `
--data-urlencode 'scope=https://api.partnercenter.microsoft.com/user_impersonation offline_access openid profile' `
--data-urlencode 'grant_type=refresh_token' `
--data-urlencode "refresh_token=$($JSON.refreshToken)"```
Steps to reproduce
Expected behavior
$token.RefreshToken
has a valueActual behavior
$token.RefreshToken
has an empty value.Environment
Other Info
$token.RefreshToken
.AccessToken
,IdToken
etc are returned on the macOS machine, onlyRefreshToken
is missing