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
Anonymous
Not applicable

How to add a service principal profile to a workspace using the Power BI REST API?

Hi!

I am trying to add a service principal profile to a workspace I have just created.

I review the documentation and don't understand it...

I review the documentation on this page

what should I put on the data part of the request below?

 

thank you, Tal

 

 

 

payload = {
                  "identifier": f'{what should I put here?}',
                  "groupUserAccessRight": "Admin",
                  "profile" : f'{what should I put here?}',
                  "principalType" : f'{what should I put here?}'
                }

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi   @Anonymous ,

 

payload = {
                  "identifier": f'{what should I put here?}',
                  "groupUserAccessRight": "Admin",
                  "profile" : f'{what should I put here?}',
                  "principalType" : f'{what should I put here?}'
                }

"identifier": Application (client) ID, You can find it in App registrations in Azure Portal.

"groupUserAccessRight": The role you want to give the Service Principal.
"profile": 
For refernece: ServicePrincipalProfile 
Only relevant for Power BI Embedded multi-tenancy solution.
"principalType" : App
For reference: PrincipalType 
 

Best Regards,
Rico Zhou

 

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

5 REPLIES 5
Anonymous
Not applicable

Hi @leonids2005 

I was able to write code which create a service principal profile and publish a PBIX file into a workspace all using the PBI REST API.

Exactly what explained in this link.

I have everything on Github, I can share it...

Do you want to write your email?

 

Have a great day, Tal

 

Any chance to get access to Github? I have sent you my e-mail address. Thank you

sent my e-mail

Anonymous
Not applicable

Hi   @Anonymous ,

 

payload = {
                  "identifier": f'{what should I put here?}',
                  "groupUserAccessRight": "Admin",
                  "profile" : f'{what should I put here?}',
                  "principalType" : f'{what should I put here?}'
                }

"identifier": Application (client) ID, You can find it in App registrations in Azure Portal.

"groupUserAccessRight": The role you want to give the Service Principal.
"profile": 
For refernece: ServicePrincipalProfile 
Only relevant for Power BI Embedded multi-tenancy solution.
"principalType" : App
For reference: PrincipalType 
 

Best Regards,
Rico Zhou

 

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

 

were you able to make it work. I am trying to do this and getting 

{
    "error": {
        "code""PowerBIEntityNotFound",
        "pbi.error": {
            "code""PowerBIEntityNotFound",
            "parameters": {},
            "details": [],
            "exceptionCulprit"1
        }
    }
}

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.