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

Workspace ID

Hello,

I am learning MS Fabric and I would like to call Notebook via HTTP request (POST https://api.fabric.microsoft.com/v1/workspaces/{{WORKSPACE_ID}}/items/{{ARTIFACT_ID}}/jobs/instances...).

To achieve it I need to now WorkspaceID and notebook ArtifactID. 

For that I need to create Workspace Identity, but this option is disabled. I have trial version of Fabric (F64) and I get folllowing warnning:

Workspace identities are supported in workspaces assigned to Fabric capacities (F64 or higher). If this workspace was migrated and is no longer assigned to an F64 (or higher) capacity, any items using workspace identities may no longer work.

Where could be a problem please?

 

3 ACCEPTED SOLUTIONS
v-nikhilan-msft
Community Support
Community Support

Hi @fantomas 
Thanks for using Fabric Community.
To get the Workspace Id you can simply refer to the URL of the Workspace. Just open the workspace in Fabric and get the URL. For example:
https://msit.powerbi.com/groups/9aa06270-7312-4340-ab81-690afd6cg56/list?experience=power-bi 

The string in bold letters is your workspace id. 
Similarly you can open the notebook and fetch the URL:

https://msit.powerbi.com/groups/9aa06270-7312-4340-ab81-690afd6cg56/synapsenotebooks/bfcb353f-66f1-428a-8416-682c8c23?experience=power-bi 

The string in bold letters is your notebook id in the same workspace.

Hope this helps. Please let me know if you have any further questions.

 

View solution in original post

Hi @fantomas 
We haven’t heard from you on the last response and was just checking back to see if your query got resolved. Otherwise, will respond back with the more details and we will try to help.
Thanks

View solution in original post

Hi @fantomas 
The orginal ask is different from the above query. Can you please create a new post for the above query and provide all the details?
Thanks

View solution in original post

5 REPLIES 5
fantomas
Frequent Visitor

Hi @v-nikhilan-msft,

this one request is resolved. Could I have another one?

I need to use Fabric API to run notebook. I have created app registration for this purpose. I get the token but when I use it to call Fabric API, a get error 

{"requestId":"852e1ecc-6970-4d4e-bea7-9baeb5d177df","errorCode":"Unauthorized","message":"The caller is not authenticated to access this resource"}.
 
from azure.identity import ClientSecretCredential
tenant_id = 'xxx'
client_id = 'xxx'
client_secret = 'xxx'
client_secret_credential_class = ClientSecretCredential(tenant_id=tenant_id, client_id=client_id, client_secret=client_secret)
access_token_class = client_secret_credential_class.get_token(scope)
token_string = access_token_class.token

. . . then I use it to get workspaces

response: requests.Response = requests.get(url=url, headers=get_headers())
fantomas_0-1715799342720.png

Where could be problem? What do I wrong?

Thanks

 

Hi @fantomas 
The orginal ask is different from the above query. Can you please create a new post for the above query and provide all the details?
Thanks

fantomas
Frequent Visitor

Hello,

thank you for your message(s). I realized later, that it will be accessible from url . . . as you recommended it to me.

So from this point of view is my code working.

 

Thanks

v-nikhilan-msft
Community Support
Community Support

Hi @fantomas 
Thanks for using Fabric Community.
To get the Workspace Id you can simply refer to the URL of the Workspace. Just open the workspace in Fabric and get the URL. For example:
https://msit.powerbi.com/groups/9aa06270-7312-4340-ab81-690afd6cg56/list?experience=power-bi 

The string in bold letters is your workspace id. 
Similarly you can open the notebook and fetch the URL:

https://msit.powerbi.com/groups/9aa06270-7312-4340-ab81-690afd6cg56/synapsenotebooks/bfcb353f-66f1-428a-8416-682c8c23?experience=power-bi 

The string in bold letters is your notebook id in the same workspace.

Hope this helps. Please let me know if you have any further questions.

 

Hi @fantomas 
We haven’t heard from you on the last response and was just checking back to see if your query got resolved. Otherwise, will respond back with the more details and we will try to help.
Thanks

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!