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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
EduardD
Resolver I
Resolver I

Call Refresh user membership/permission API under service principal (PBI embedded for Org)

Hi folks, 

I want to confirm that we can call RefreshUserMenership API under service principal.
Users - Refresh User Permissions - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Will it work for users with MFA? 

What permission service pricnipal should have to run that API? We are getting 401 when try to call that API using with service principal using user token.

5 REPLIES 5
EduardD
Resolver I
Resolver I

Thank you, we do have that. Any specific permissions required for it to call the refresh group membership api?

aj1973
Community Champion
Community Champion

To authenticate, the service principal uses the Microsoft Entra app's application ID and one of the following:

 

  • A certificate
  • An application secret

 

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

aj1973
Community Champion
Community Champion

Hi @EduardD 

Technically you need to use a Power BI App registration in order to call the API :

 

To authenticate, the service principal uses the Microsoft Entra app's application ID and one of the following:

  • A certificate
  • An application secret

https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-service-principal

 

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

Thank you, but we already know all that, the question is for that specific API listed above.
Can service principle call that API on user behalf?
what specific Power BI permission should be assigned to the service principal?  For example, should Service principal be a Power BI admin for calling that API?  

aj1973
Community Champion
Community Champion

No a user or UID can't use the API.

The service principal should have full access through Read.Write all in the APP registration.

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.