Query roles associated with a particular subscription via REST

Jun13
Giga Contributor

I try to find out all the users who are using ITSM subscription via REST call. I try to find all the roles associated with the subscription, then find users assigned with each roles. However the number of roles I got from REST API call tolicense_role table (with license_role_type=fulfiller as filter) is totally different than what I can see from ServiceNow console ( when I look at associated role tab under the ITSM subscription).  Am I looking at wrong table or what? Thanks. 

1 ACCEPTED SOLUTION

Jun13
Giga Contributor

Thanks! Now I'm able to get correct number of roles associated with the subscription. 

View solution in original post

2 REPLIES 2

Nikhil65
Mega Guru

The roles that are populated under the ITSM subscription are mapped from 'license_details_assoc_roles' table. Also, it is possible that your ITSM subscription might have other role-types as well(fulfiller, requestor...). Hence there could be a discrepancy in the call that you are making.

Moreover, license_role table will consist the custom roles of the custom applications that you built in your instance. But these custom roles are not mapped under subscription as per my knowledge, so please cross-verify those as well.

Jun13
Giga Contributor

Thanks! Now I'm able to get correct number of roles associated with the subscription.