Skip to content

Commit

Permalink
Use access_token grant instead of refresh_token (microsoft#2153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwateratmsft authored and Dmarch28 committed Mar 4, 2021
1 parent 7ed8ead commit 14a2d84
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils/azureUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ export async function acquireAcrRefreshToken(registryHost: string, subContext: I
const response = <{ refresh_token: string }>await request.post(`https://${registryHost}/oauth2/exchange`, {
form: {
/* eslint-disable-next-line camelcase */
grant_type: 'refresh_token',
grant_type: 'access_token',
service: registryHost,
tenant: subContext.tenantId,
/* eslint-disable-next-line camelcase */
refresh_token: aadTokenResponse.refreshToken,
/* eslint-disable-next-line camelcase */
access_token: aadTokenResponse.accessToken,
},
json: true
Expand Down

0 comments on commit 14a2d84

Please sign in to comment.