Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PowerBIUser5
Regular Visitor

How can we tell the difference between Power BI Admin and Tenant accounts using an API?

Hello,

 

In our C# application, we're utilizing the PowerBI REST APIs. We have two PowerBI accounts, one for administration (Admin) and another for tenants (Tenant). We are interested in determining whether there is an API that allows us to distinguish between these two accounts based on the email address or any other identifying parameter. Could you please assist us with this query?

 

Thank you in advance.

5 REPLIES 5
GilbertQ
Super User
Super User

Hi @PowerBIUser5 


To find that out you would need to use the Graph API to get back which roles the user has to see if the user has got the Power BI Administrator role





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Thankyou for the solution. We have checked the available api's but coudn't found the suitable api. 
Can you please help us with finding the api which helps us to achieve our requirement.

 

 

Thanks in advance.

Hi @PowerBIUser5 

 

Here we go: List Microsoft Entra role assignments for a user | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

GilbertQ
Super User
Super User

Hi @PowerBIUser5 

 

I do not follow how you want to distinguish the different accounts, is this when running it via your c# application?

 

If so can you not put into a table or the API call add an extra column which would store the accounts name?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Hi @GilbertQ 

 

We have a login option in our c# application, while login in we want to know whether the user is admin or tenant using their email id through API call. What API we have to use to findout the user type.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors