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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
withnoe
Frequent Visitor

DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously

I am getting the error " query. DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously."  when trying to impliment this suggested article https://pbi-guy.com/2023/03/25/connect-with-power-bi-to-the-power-bi-rest-api-with-a-service-princip... to create a report that connects with Power BI to the Power BI REST API with a Service Principal.  I have checked my permissions and they are set to anonymous.  What am I missing?

 

withnoe_0-1735920107717.png

 

Here is a link to download the report used on this page  https://github.com/PBI-Guy/blog/blob/main/Connect%20with%20Power%20BI%20to%20the%20Power%20BI%20REST...

Just click on the download icon.

 

1 ACCEPTED SOLUTION
withnoe
Frequent Visitor

I could not get it to work correctly.   I think it might have to do with the fact that the organization that I work for doesn't have a premier license.  However, I found a custom connector that will connect to the Power BI API's automatically.  https://github.com/migueesc123/PowerBIRESTAPI

View solution in original post

3 REPLIES 3
withnoe
Frequent Visitor

I could not get it to work correctly.   I think it might have to do with the fact that the organization that I work for doesn't have a premier license.  However, I found a custom connector that will connect to the Power BI API's automatically.  https://github.com/migueesc123/PowerBIRESTAPI

v-nmadadi-msft
Community Support
Community Support

Hi @withnoe  ,

Please check this documentation
Automate Power BI Premium workspace and semantic model tasks with service principals - Power BI | Mi...
especially this part

 

vnmadadimsft_0-1736171759499.png

 


And most importantly

 

vnmadadimsft_1-1736171804900.png

 


and complete the workspace access part which is right below enable service principals.

Hope these suggestions will help you and please reach back if you have any further questions.
Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to give "Kudos"

Thanks and Regards



lbendlin
Super User
Super User

- make sure the token is  usable (no delegated permissions!) - check at jwt.io

- make sure the service principal is added to the artifact you are trying to query

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.