Provider Error Message: error_description - access_denied, error - server_error

Good Morning,
Can anybody offer any tips or solutions on how they got this issue fixed for ServiceNow integration? This issue specifically shows up when we try to authenticate a connection for a bot user. When we try to integrate using personal users, it works fine, so we know it’s not an OAuth issue on the UiPath connection creation, but maybe just the settings we have on our bot user.
I’ve tried tweaking around with these features, primarily password, web services access only,y and internal integration user

I will be working with a ServiceNow dev today to try and get this sorted, as I don’t have the role “security_admin” to make any changes. My thinking was that the bot user just needed to be removed and recreated, but I wasn’t too sure what setting or feature was making it impossible to authenticate. Also, we do not see any failed connections in the ServiceNow logs, so if anyone has any suggestions or solutions, I’d love to hear them. Thanks

@cemenike

Detailed steps are here on creating connection

Cheers

Thanks, We have already created this connection and as stated, it works fine for personal users, just our bot user that is having this error access denied

@cemenike

Just to check did you try these credentials with postman?if not can you try there

Also its better you recheck the client secret may be some extra character

Cheers

1 Like

@cemenike

Would be a good idea to compare the access enabled in your personal user and bot user.

Most likely bot user would be a service account and can have different set of privileges than a personal user.

Also you can check by manually login to service now from bot account.

Additionally, could you please confirm if you are using client id secret to authenticate or using direct username password?

If you are using client id secret, you should not face any issue connecting to that irrespective of the personal/bot user type.

Yes, i can manually log in to service now using the bot credentials. for the connection I am using client id and secret. Would anyone happen to know where oauth failed connection logs would be in service now

Attemped using postman and same error comes back
image

@cemenike

can you show your configuration when trying from postman?

@cemenike

Fair.Atleast this confirms the issue is with service auth only

once you reach to admin may be you would get more info…

Also one thing I observed in screenshot is that you need to enable web service as API needs to be accessed

cheers

@cemenike

endpoint url you are using in get is not correct.

please put your servicenow endpoint in there

also, i think you grant type should be client_credentials and not password credentials..

can you try different ways to connect to same and confirm the behavior?

the way you are trying to connect right now is used to get interactive token..

okay. i changed grant type to client credentials, changed the Get endpoint to https://cloud.uipath.com/provisioning_/callback. still getting the
Error: server_error, description: access denied

We’ve also tried recreating the UiPath Application in ServiceNow. We still see the same issue
This is the error message we see in ServiceNow, if anyone is familiar
Exception on token flow - invalid_scope: The provided OAuth token is not valid: no thrown error

hi @cemenike

Could you please describe in detail what steps have you done that led to successful authentication using personal user.

Also share the steps you took to authenticate using bot user.

Also please share screenshots to help us understand the root cause better.

Thanks.

Hello Sonali. This was the solution. Our ServiceNow admin had to recreate a new UiPath Application Registry with the scope: useraccount. He then created a new bot user for me to use. I tested this user in POSTMAN using
POST: https://myinstance.servicenow.com/oauth_token.do

I got the same error again and checked my request body to make sure I was sending the right info and saw two random spaces at the end of my password. Removed them, reran, and it authenticated. I was certain that a wrong password would’ve given a different error, like invalid password error, instead of an access denied server error, but the issue has been solved now. Thank you and @Anil_G for your help.

2 Likes

@cemenike

Glad finally it ended up to be same

Cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.