Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
Hello,
I would like to retrieve the name of my workspace through a notebook, but this code doesn't work: spark.conf.get("trident.workspace.name")
Then this one works very well: spark.conf.get("trident.workspace.id")
Is it in preview or do you have to use another function?
Thank you in advance for your answers
Solved! Go to Solution.
Hi @Mnnleus
Thanks for using Fabric Community.
Currently there is no spark config that stores the workspace name. spark.config.get("trident.workspace.name") used to work before, but is not available now.
Hope this helps. Please let me know if you have any further questions.
Hey @Mnnleus ,
Have found workaround - the proposed "solution" (this is "not possible" 😒) is pretty unhelpful.
This code queries the fabric api for the workspace name taking the workspace ID from configuration. Should work if copy and pasted in.
import sempy.fabric as fabric
workspace_id = spark.conf.get("trident.workspace.id")
workspace = fabric.FabricRestClient().get(f"/v1/workspaces/{workspace_id}").json()["displayName"]
This has broken some of my pipelines as I relied on this spark config. Hopefully this gets resolved soon or there is another fix in place.
Hi @Anonymous,
thank you for your answer
Hi @Mnnleus
Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.
Hi @Mnnleus
Thanks for using Fabric Community.
Currently there is no spark config that stores the workspace name. spark.config.get("trident.workspace.name") used to work before, but is not available now.
Hope this helps. Please let me know if you have any further questions.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
43 | |
17 | |
10 | |
6 | |
3 |
User | Count |
---|---|
53 | |
51 | |
14 | |
9 | |
6 |