Hi @Mohd Arif ,
I understand you are trying to assign the same permission from one user to another.
To get the permissions assigned to user A, you can leverage Graph API endpoint
GET /roleManagement/directory/transitiveRoleAssignments?$filter=principalId eq '{principalId}'
to get the list of direct and transitive objects (If a user is assigned an Azure AD role through group membership) for a specific principal and this request will list the group's ID as the principalId otherwise principalId is user's object id**.**
Here roleDefinitionId are the roles assign to the user.
You can check the role name using
https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions
and assign the same roles to another users using
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.