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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
NickA01
Resolver III
Resolver III

admin api define myorg

Hi all. 

My org currently has has 2 seperate Power Bi tenants due to a merger. 
I have audit and platform scan set up on each tenant using ADF. 
Each tenant is as ring fenced setup. 
ADF in Azure Tenant A calls Power Bi API's in Tenant A and writes to an Azure SQl DB in Tenant A.
ADF is authorised by using system assigned managed identity in tenant A.
ADF in Azure Tenant B calls Power Bi API's in Tenant B and writes to an Azure SQl DB in Tenant B.
ADF is authorised by using system assigned managed identity in Tenant B.

Data is visualised in serveral reports in the Power BI service assiociated to Tenant B. 

Now, I want to just run 1 ADF, Have 1 SQl DB to store the data. 
The API's base url is https://api.powerbi.com/v1.0/myorg/admin/

The question is 
1: Can  'myorg' in the base url be replaced with the tenant ID. 
2: If it can, would I be correct that I'll need to set up a service principle in Tenant A, add it to my security group that can access the admin api  and call the API from Tenant B using the Service Principle credentials?

Thanks in advance.

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi ,  @NickA01 

According to your description, you want to call the admin REST API in Power BI.

For your question, here is my understanding.As searched , the rest api in official document is like this:

GET https://api.powerbi.com/v1.0/myorg/admin/apps/{appId}/users

And the "myorg" is not contains the "{" and "}" , this means that this parameter cannot be replaced by tenantid.

In the interface document, only the parameters included in "{}" can be replaced by variables.

 

Secondly, whether you can successfully call the API depends on whether the API you generated the access token has permission to call the API.

My understanding is that it will automatically judge your tenant information based on the access token you obtained and return the corresponding value.
 

For detailed preconditions, you can check the description of each interface:

vyueyunzhmsft_0-1689558195313.png

And for this , you can also refer to :
Admin - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi ,  @NickA01 

According to your description, you want to call the admin REST API in Power BI.

For your question, here is my understanding.As searched , the rest api in official document is like this:

GET https://api.powerbi.com/v1.0/myorg/admin/apps/{appId}/users

And the "myorg" is not contains the "{" and "}" , this means that this parameter cannot be replaced by tenantid.

In the interface document, only the parameters included in "{}" can be replaced by variables.

 

Secondly, whether you can successfully call the API depends on whether the API you generated the access token has permission to call the API.

My understanding is that it will automatically judge your tenant information based on the access token you obtained and return the corresponding value.
 

For detailed preconditions, you can check the description of each interface:

vyueyunzhmsft_0-1689558195313.png

And for this , you can also refer to :
Admin - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors