I need to get the role of user who logged in to provide role based functionalities. Iam unable to get the type of role from API. is there any method to get the logged user role through API?
Asked
Active
Viewed 43 times
0
-
Do you mean on server or client side? C# or JS? :) – Miklós Tóth Nov 21 '19 at 15:29
-
@MiklósTóth We are using React for front end. To be specific I have a create directory button in front end. Only Certain users with certain roles should be able to use this. That means for other users this button should be invisible. – Anil Kumar Dec 05 '19 at 04:45
1 Answers
0
If you know the user's Path you can use the GetPermissions
action:
http://example.com/OData.svc/workspaces/Project('budapestprojectworkspace')/GetPermissions?identity=userPath
Check the docs here

Aniko Litvanyi
- 2,109
- 1
- 21
- 25