Invalid client id error for ExternalAuthorization

We are trying to user oauthv2 for GenerateAccessToken. We are providing ExternalAccessToken. This is how the policy looks like.

OAuth.GetProfilePermission IAM_ACCESS_TOKEN true GenerateAccessToken FORM_PARAM false true client_credentials

We are getting {“ErrorCode” : “invalid_client”, “Error” :“ClientId is Invalid”}. Can someone please help urgently? Thanks !

Hi @Jaideep Joshi,

In the policy you have - IAM_ACCESS_TOKEN

IAM_ACCESS_TOKEN - is this your access token which you have generated from the external system?

@Jaideep Joshi, how are you passing your client_id? Is there any app with that client_id?

It’s likely you haven’t set the variable oauth_external_authorization_status to true. You may do this via an AssignMessage policy in a preceding step.

In addition, you must put the client_id in the formparam, i.e., request.formparam.client_id. If you aren’t doing this on the original request, you’ll want to also set this, perhaps via an AssignMessage policy in a preceding step.

Also see this documentation page for more details on enabling 3rd party tokens on Edge.