How can i update accesstoken.{custom_attribute} ?

Not applicable

i have two ouath policies in one i am adding customattribute like this

<Attributes>
<Attribute name="custom1" display="false" ref="request.header.check"/>
</Attributes>

and another policies i want to update same custom attribute

<Attributes>
<Attribute name="custom1" display="false" ref="request.header.check"/>
</Attributes>

But value is not updating

0 2 116
2 REPLIES 2

Former Community Member
Not applicable

Use the Set OAuth v2 policy to update access token attributes.

Not applicable

As mentioned by above use the Set Oauth v2 policy as found in the documentation

http://docs.apigee.com/api-services/reference/set-oauth-v2-info-policy

example

<SetOAuthV2Info name="SetOAuthV2Info"> 
  <AccessToken ref="access_token"></AccessToken>
  <Attributes>
    <Attribute name="departmentId" ref="department_id"></Attribute>
  </Attributes>
</SetOAuthV2Info>

note: in this scenario you would have already validated the access token and the access_token lives in the access_token variable.