Oauth 2.0 authentication is throwing an error like access_denied, No audience parameter was provided
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 02:36 AM
We are trying to integrate servicenow with solify with Oauth 2.0 as Outbound rest API integration. We have received the client ID and client secret and we have created Oauth provider profile but when we try to Get Oauth token, we are getting the below error message.
"OAuth flow failed. Verify the configurations and try again. Error detail:access_denied, No audience parameter was provided, and no default audience has been configured"
Please provide your insights on where we can provide the audience in ServiceNow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 03:32 AM
Hi @vivek chelpuri2 ,
The audience parameter exists as part of the OAuth2.0 protocol.
The audience (presented as the aud claim in the access token) defines the intended consumer of the token.
This is typically the resource server that a client (Application) would like to access.
It can be added to the request to authorize i.e. audience: 'https://test-api'
Please make changes to your request body to include audience parameter as OAuth 2.0 is expecting that parameter.
Please mark response as helpful and correct if it resolves the issue
Thanks !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 06:02 AM
Hello Manmohan,
Thanks!! for your response. Can you please guide us on where we can add the audience parameter on the Oauth provider profile.
Thanks,
vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 06:06 AM
We need to get the Oauth token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2023 06:02 AM
Did you find the solution to this?
I'm having the same problem.