Hello @Madhav M ,
I understand that when you use the GET RoleAssignment endpoint, GET RoleDefinition by ID, or the GET RoleDefinition endpoint with a $filter
query on the ID, you are still able to retrieve details of deprecated roles. This has caused some confusion about why there are still role assignment entries for these deprecated roles
- When using the GET RoleAssignment endpoint, you are seeing a deprecated role because it is currently assigned to a user in your tenant. That’s why it appears in the response. If you no longer want this role to appear, you can remove the user it’s assigned to, since the role is deprecated.
- When using the RoleDefinition endpoint with the
$filter
query parameter on the role ID, you are seeing a deprecated role because the filter expression is evaluated for each resource in the collection. Only items where the expression evaluates to true are included in the response. Since the specified ID matches and the user with that role still exists in the tenant, the deprecated role is returned in the results.
For additional information follow: Role Defination , Role Assignment , Filter Parameter
Hope this information helps.Let us know if you have any additional queries.Happy to assist you further.