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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MaikvanderGaag
New Member

Power BI Government API

Hi Everyone,

 

At this moment we are building some automation scripts that make use of the Power BI API. When connecting to Power BI government tenant we are having some authentication issues.

 

Could someone inform me what the difference is between the two versions government / Non government. And how we can use the api's within a government tenant.

 

With regards

11 REPLIES 11
Watsky
Solution Sage
Solution Sage

@MaikvanderGaag 

 

The biggest difference between Government and Commerical is that Government has more restrictions than Commerical does. So, lots of features come later on GC Cloud.

 

This link goes over the limitations of the different Government Cloud options:

 

https://docs.microsoft.com/en-us/power-bi/admin/service-govus-overview#limitations-of-power-bi-us-go...

 

 

This link goes over all the different API web addresses for government 

https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers-national-clo...

 

Here's the Power BI Government Blog

 

https://powergi.blog/

 

For using the API you would use it the same way as you would use the Commerical API with the difference being the address. 

https://api.powerbi.com/v1.0/myorg/ 

vs

https://api.powerbigov.us/v1.0/myorg/

 

So the same calls found on this link would be used 

 

https://docs.microsoft.com/en-us/rest/api/power-bi/admin/datasets_getdatasetsasadmin 

 

Hope this helps.

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Anonymous
Not applicable

Hi @Watsky 

I am also using Government Power BI Version. 

I can get a bearer token using postman. 

But when I tried to do a simple GET or POST method using postman I am getting this error "403 Forbidden - The request was a legal request but the server is refusing to respond to it. Unlike a 401 Authorization response, Authenticating will make no difference."

Any thoughts on this error message? 

Get request I am using - https://api.powerbigov.us/v1.0/myorg/groups/{dataset_ID}/datasets

Hey @Anonymous ,

 

It's hard for me to say without knowing more background on how you're trying to connect to it for instance what you're using for your token uri, auth uri, or redirect uri. What I can tell you is that if you're Azure authentication is MFA then Postman can't handle the request. Postman can only do single factor. If you want to test using Postman you can still do it but you'll need to grab a token from a different place.

 

1. Log into apps.powerbigov.us

2. Click F12  

3. Navigate over to Network

4. Click through the different requests that are shown (Some may just have numbers. These usually have the bearer)

5. Copy the token and give that a try.

 

Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Anonymous
Not applicable

Hi @Watsky 

 

Here is the background or more details about the issue. I completed below steps till now 

  1. Creating an App in Power BI developers website - https://app.powerbigov.us/apps : - done
  2. Providing necessary permissions to the App in Azure – done
  3. Generating access tokens using Postman – done                                                                url using to generate bearer token is - https://login.microsoftonline.com/common/oauth2/token 
  4. GET/POST request using Postman with bearer tokens created from previous step – Pending (This is where we are getting 403 forbidden error)

Redirect uri - http://localhost/redirect/

MFA is not enabled in Azure.

I am having the EXACT same issue with the EXACT same steps and GET request. Can someone please help @Anonymous and myself

This is exactly what I'm looking for! Thanks!

 

Do you maybe also know if there are ways to test it? I'm building automation scripts and would also like to make them compatible with the government api's

Sure try this 

 

https://reqbin.com/

 

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Yes I know that option, but When testing would like to test against a real tenant and I do not have access to any government tenant.

 

but I guess that there is no solution for that.

@MaikvanderGaag I'm unaware if there is one, but I can tell you that I use the Government Cloud and other than the first part of the API address nothing is different. I still use the calls that are found under the Commerical API.

 

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

lbendlin
Super User
Super User

I think you mean Government. Governance is something different.

 

I couldn't find an API specific link but here is a general feature comparison between "regular" and "government"  capacities:

 

https://docs.microsoft.com/en-us/power-bi/admin/service-govus-overview

@lbendlin : You are totally right. I was working on a Azure Governance model and mixed things up.

 

Also thank you for that information, I really hope that there is someone who has more information regarding the API's 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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