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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
seethalakshmis
Frequent Visitor

Service Principal Authentication for Fabric capacity

I'm trying to assign Capacity to a workspace which is already created using a ServicePrincipal. I have provided all necessary API permissions and Capacity admin role to the SP. But still, It says Unauthorized error. Can someone help me here? Not sure what i'm missing here 

1 ACCEPTED SOLUTION

We were able to resolve this through Invoke-RestAPI method using AssignGroup URI.

View solution in original post

4 REPLIES 4
seethalakshmis
Frequent Visitor

By default, When the SP creates a workspace it would be the admin. with REST API is also, it's not successful.

Can you explain a bit more what you are doing, which code you are using and which error messages you get?

FabianSchut
Super User
Super User

Do you try to assign the capacity with REST API? Is the service principal also added to the workspace as an admin?

We were able to resolve this through Invoke-RestAPI method using AssignGroup URI.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

JanFabricDE_carousel

Fabric Monthly Update - January 2025

Explore the power of Python Notebooks in Fabric!

JanFabricDW_carousel

Fabric Monthly Update - January 2025

Unlock the latest Fabric Data Warehouse upgrades!

JanFabricDF_carousel

Fabric Monthly Update - January 2025

Take your data replication to the next level with Fabric's latest updates!