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
TalIL87
Frequent Visitor

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
v-rzhou-msft
Community Support
Community Support

Hi   @TalIL87 ,

 

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
TalIL87
Frequent Visitor

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

v-rzhou-msft
Community Support
Community Support

Hi   @TalIL87 ,

 

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
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.

Top Solution Authors