Role needed to call rest API

Its_Azar
Tera Guru

I have a Record Producer in Service Portal. On change of a field, I call an endpoint that sets values in another field based on the user’s selection. I’ve implemented this using a Catalog Client Script that calls a Script Include to process the REST request.

The issue is: for normal users, the request doesn’t trigger at all, but if I give the user the ITIL role, it works as expected. Giving ITIL seems like overkill.

How can I make this work for normal users without granting ITIL.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India
2 ACCEPTED SOLUTIONS

KrishnaMohan
Giga Sage

Hi @Its_Azar 

so it is working for itil role users but not for others. I believe you are using glideajax to call script include from client script and require that users satisfy an ACL associated with your script include.

ACL for  client callable / Glide AJAX enabled script includes determine who can access a Glide AJAX/client callable enabled script include.

what is the acl for your script include?


Regards,
krishna mohan

View solution in original post

 

Hey, @KrishnaMohan 

that was spot on. I didn’t realize my client-callable script includes would automatically create ACLs—silly me. And yeah, for some reason I had ITIL set as a required role. thanks much i was going through everything to check what went wrong never thought of this.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India

View solution in original post

5 REPLIES 5

Chaitanya ILCR
Kilo Patron

Hi @Its_Azar ,

 

Why REST call? Why not directly set the value using the client script Glide ajax call to the script include?

 

Regards 

Chaitanya 

KrishnaMohan
Giga Sage

Hi @Its_Azar 

so it is working for itil role users but not for others. I believe you are using glideajax to call script include from client script and require that users satisfy an ACL associated with your script include.

ACL for  client callable / Glide AJAX enabled script includes determine who can access a Glide AJAX/client callable enabled script include.

what is the acl for your script include?


Regards,
krishna mohan

 

Hey, @KrishnaMohan 

that was spot on. I didn’t realize my client-callable script includes would automatically create ACLs—silly me. And yeah, for some reason I had ITIL set as a required role. thanks much i was going through everything to check what went wrong never thought of this.

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India

@Its_Azar  I'm glad I could provide a helpful solution for the ServiceNow community.