Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Invalid Authorization Code error using OAuth 2.0 policy with external authorization

I am developing a proxy in order to integrate Apigee with Azure.(External Authorization with auth code grant type)

I have similar issue like this thread - https://community.apigee.com/questions/36580/invalid-authorization-code-error-using-oauth-20-po.html

I made sure that policy has all the specified parameters as mentioned in the above thread's solution.

But still giving me same error.Please help .

The Oauth policy looks like below :

<OAuthV2 name="Oauth2.GenerateAccessToken"> 
  <DisplayName>Set OAuth Tokens</DisplayName> 
  <ExternalAuthorization>true</ExternalAuthorization> 
  <Operation>GenerateAccessToken</Operation> 
  <ClientId>request.formparam.client_id</ClientId> 
  <ReuseRefreshToken>false</ReuseRefreshToken> 
  <SupportedGrantTypes> 
    <GrantType>authorization_code</GrantType> 
  </SupportedGrantTypes> 
  <GrantType>request.formparam.grant_type</GrantType> 
  <GenerateResponse enabled="true"> 
    <Format>FORM_PARAM</Format> 
  </GenerateResponse> 
  <ExternalAccessToken>externalAccessToken</ExternalAccessToken>
  <StoreToken>true</StoreToken> 
  <Tokens/> 
</OAuthV2>
0 7 1,347
7 REPLIES 7