Unauthorized error while calling endpoint without admin role

dron
Tera Contributor

I have a rest message defined and consuming below api.

https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/queue?view=azure-devops-rest-7....

 

I am calling REST API using script include and when submitting request with admin role, it is working fine and returning 200 status code. When ITIL user is submitting request it is giving Unauthorized error. When I am providing admin role to user it is working fine. Could anyone please suggest which role I need to provide for accessing REST API endpoint.

7 REPLIES 7

DrewW
Mega Sage
Mega Sage

I would check to see if there is a role needed to access the end point. Without knowing which web service you are using its difficult to know.

 

But if it works as ADMIN and not as ITIL then its a role issue.

 

SOAP Roles are here and there are similar ones for the REST API.

https://docs.servicenow.com/bundle/utah-api-reference/page/integrate/inbound-soap/concept/c_SOAPWebS...

 

 

 

Oh, so in ServiceNow you are making an outbound call to a web service.  How are you going about it?  Are you making the call from the client or server side?  Did you setup an outbound web request or do something else?

dron
Tera Contributor

I consumed API under outbound -> rest message. Defined get and post method and using OAuth2.0 authentication type.

I have provisioning workflows where I am calling script include, which is calling above API with all parameters.

 

When I am submitting request into SN, it is working as expected and when itil user is submitting request it is giving 203 error.