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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Merry
Regular Visitor

PowerBI Embedded Service Principal PowerBINotAuthorizedException with Viewer accesse

I implemented powerBi embeded in an onpremise application and used the Service Principal method.

Everything works fine and report is showing correctly . The service Principal has Admin or Memebr access in power BI Workspace that the report exists as it is suggested in the below link

 

Embed Power BI content in an embedded analytics application with service principal and an applicatio...

 

However I do not understand why we need the Memeber or Admin access in Power BI Workspace for that service principal?

If I change the access to View or Contributer I will get 401 on error PowerBINotAuthorizedException when calling PowerBiEmbedToken

 

Any Insignt Will be apprecaited.

 

Thanks,

 

1 ACCEPTED SOLUTION
aj1973
Community Champion
Community Champion

Hi 

Because you can only be a Member or Admin to use Service Principal for Authentication methode

Embed content in your Power BI embedded analytics application - Power BI | Microsoft Docs

aj1973_0-1624295848548.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

4 REPLIES 4
aj1973
Community Champion
Community Champion

Hi @Merry 

I think this thread can help you out!

Solved: Embedding Service principle AppOwnsData 401 Servic... - Microsoft Power BI Community

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi Thanks for the response but the link you provided did not answered my question

 

1- I already toggling the Allow service principals in PowerBto access Power BI APIs setting to enabled

2- I created Azure Active directory Security Group and added My APID to it

3- Added this security group to my Workspace in Power BI

4- Gave Admin/member access

 

 

Everything works fine and i get my embeded report

 

My questions is why do I need to give Admin or Memebr access why cant i just give the Viewer or Contributer access to that security group? Viewer has read access and should be able to see the content of the report in power bI . Why do i need to give the higher access?

aj1973
Community Champion
Community Champion

Hi 

Because you can only be a Member or Admin to use Service Principal for Authentication methode

Embed content in your Power BI embedded analytics application - Power BI | Microsoft Docs

aj1973_0-1624295848548.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

I saw this and that is why i set it to Admin/member but i dont understand why?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors