get oauthv2accesstoken custom_attribute_name

Not applicable

oauthv2accesstoken.{policy_name}.accesstoken.{custom_attribute_name}

This statement is not working for me

Solved Solved
0 3 148
1 ACCEPTED SOLUTION

Hi @seamaslee,

If are trying to access custom attributes of access token then you have to use accesstoken.{custom_attribute_name}. No need to prefix oauthv2accesstoken.{policy_name}. This you have to use after verify oauth token policy.

For example for cust_id custom attribute use like accesstoken.cust_id. This should work perfectly.

View solution in original post

3 REPLIES 3

Hi @seamaslee,

If are trying to access custom attributes of access token then you have to use accesstoken.{custom_attribute_name}. No need to prefix oauthv2accesstoken.{policy_name}. This you have to use after verify oauth token policy.

For example for cust_id custom attribute use like accesstoken.cust_id. This should work perfectly.

@seamaslee , Welcome to Apigee Community.

Do you still see an issue ? If yes, Can you please provide more details like which policies you are using ? What exactly you are trying to achieve ? Above information is not enough to understand your query.

Not applicable

Yes, the document looks not correct about get access token attribute .

We can just get the access token by the following statement after token validation

<AssignVariable> <Name>UserName</Name> <Ref>accesstoken.username</Ref> </AssignVariable>

Any similar issue ,we can just check the flow variable in the trace , then we can finger out how can get the value.