Forum Discussion
How do I find the Semantic Model source for Excel
I have an excel workbook that pulls data from Power BI. The guy who wrote it was known for building his own things in his own workspace, data governance be damned. He is no longer with us so we have to try to reverse engineer this file. The problem is the connection info doesn't give us anything intelligible to go on.
Queries and connections > connections, gives us:
a top level url, space, a hexidecimal semantic model UID, space, "Model".
The odc file is similarly unhelpful. Testing with a new connection I made, I can paste that hex code into the PBI Service URL and get to the model but only if I also specify the workspace, which doesn't seem to be in the odc definition anywhere.
How do I find a sematic model given only the model's UID and not the name or workspace?
6 Replies
- ShivekMaharajImpactful Individual
Hi j_ocean,
That hex value should be the semantic model ID, so if you have Fabric admin access there is a fairly direct way to trace it back to the workspace.
The tenant-level Get Datasets as Admin API returns semantic models across the organization, and the response includes both the model id and its workspaceId.
So if the ID from Excel is something like:
aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeeyou can query the admin datasets endpoint and find the entry where id matches that value. The same record should give you the model name and workspace ID.
If you do not have Fabric admin rights, the normal Get datasets in group API will not help much here because it already expects the workspace ID as part of the request.
Given that you are reverse engineering an old Excel connection, I would probably start with the admin API rather than trying to infer the workspace from the .odc file.
Once you have the workspaceId, you can open that workspace and confirm the semantic model name and ownership from there.
- Bipin-LalaSolution Sage
Hi j_ocean ,
If the value in the Excel connection/ODC is the Power BI semantic model ID (dataset ID), you can use that ID to find the workspace and model name.
If you are a Fabric/Power BI administrator
The easiest approach is the Power BI Admin REST API:
GET https://api.powerbi.com/v1.0/myorg/admin/dataset
GET https://api.powerbi.com/v1.0/myorg/admin/datasetsThe admin API returns datasets across the tenant and includes both:
- id - semantic model/dataset ID
- name - semantic model name
- workspaceId - workspace containing the semantic model
- webUrl - Power BI URL
So you can search the response for the GUID from the Excel connection.
Microsoft documents the Admin API here: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets/get-datasets-as-admin
The API requires Fabric Administrator permissions (or appropriate service-principal authentication)
If you're not a Power BI/Fabric administrator
You can only discover it through workspaces where you have access.
For a known workspace:
GET https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasetsThen search the returned id values for the GUID from the ODC.
You can find the documentation here: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-datasets-in-group
Let me know if this helps!
- Pulendar1Frequent Visitor
I have tried this below url, it worked. I learned this today 🙂
https://app.powerbi.com/onelake/details/dataset/<dataset guid>
Ex : refer below. Assuming you have at least read/build permissions on the dataset.
https://app.powerbi.com/onelake/details/dataset/00000-c414-4d94-bce9-00000/
Note : If you are unable to execute dataset url, most of the organizations will open Enerprise Audit report published for company level, which should have these dataset ids captured part of the audit activities. Last option is ask your admin.
Regards,
Pulendar
- v-aatheequeCommunity Support
Hi j_ocean
Following up to confirm if the earlier responses addressed your query. If not, please share your questions and we’ll assist further.
- v-aatheequeCommunity Support
Hi j_ocean​
Have you had a chance to look through the responses shared earlier? If anything is still unclear, we’ll be happy to provide additional support.
- Kagiyama_yutakaResponsive Resident
Excel never keeps any workspace info, and u can’t trace it from the ODC. With Admin rights the dataset GUID search in the Admin datasets list shows the workspace, and without Admin rights u’d have to list all workspaces through the REST API and match the GUID.