Forum Discussion

frankyhc's avatar
frankyhc
Frequent Visitor
4 years ago

How to get current login-user's workspace

I would like to automate the capacity ordering and assignment process instead of admin manually assignment.

 

Step1: End user open an order form, and it will display all his workspace he own as admin

Step2: He could select relevant workspace and our orgnization owned capacity and click submit

Step3: After necessary approval, assignment would be processed automatically.

 

But I stuck in how to get current login user's workspace.

 

Below API can only return back all the workspaces, not easily to return login-users workspace.

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/groups-get-groups-as-admin

 

Below is an API to return back API caller's workspace. But how to get current login-user's token to call such API is a problem.

https://docs.microsoft.com/en-us/rest/api/power-bi/groups/get-groups

 

Anyone has idea about it?

8 Replies