Skip to main content

Hi,


I am trying to get the user’s base role from PD API but so far didn’t find any API for this. All I can find is the role within a team but I need Base Role as well. Can you please add this feature or point me in the right direction if this is already available?


Thanks

Hello @abdullah farooq,


You can get this with List users API - check the reference documentation here.


05


pdrole


pdroleapi


It is coming as “user” via api whereas on pager duty console I see my base role as “manager”. Which api should i use to get the role as “manager” in the output?


Hi @abdullah farooq This is a bit confusing.


From engineering:

“This is unfortunately a bit of a confusing aspect with permissions. The internal values for roles and what is returned by the API does not match up nicely with the names in the UI. This is due to the two types of permissions, basic & advanced, using similar role values to support transitioning from one to the other.

These docs explain the mapping and may be what the user is looking for: https://support.pagerduty.com/docs/advanced-permissions#roles-in-the-rest-api-and-saml


Specifically, the user role you see in the API returns is equivalent to the Manager base role in the UI.


HTH

–mandi



Hi Mandi,


Thanks a lot for the response! This document explains it. I will be using the list users api now.


Regards,


Abdullah


Reply