Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
i want to retrive information on which reports use existing semantic modells as datasource.
More specifically, it concerns reports that are based on multiple semantic models and thus generate their own semantic model when uploaded to the service.
When I use PowerShell to retrieve the semantic models and display the IDs of the “source” semantic models using get datasources, these IDs do not match the IDs of the source semantic models.
Example:
Semantik Modell 1 -> ID 1
Semantik Modell 2 -> ID 2
Publish Report using both modells create semantik Modell 3 -> ID 3
When i retrive data for semantik model ID 3, get datasources give me different DatasourceID and not the expectes ID 1 and ID 2.
Example Output of semantic Modell with ID3:
Name | empty |
ConnectionString | empty |
DatasourceType | AnalysisServices |
ConnectionDetails | Mircrosoft.PowerBI.Common.Api.Shared.DatasourceConnectionDetails |
GatewayId | e8gf98d89-23 ... |
DatasourceId | 375fb943-99... |
Why is this and how can i workaround?
Solved! Go to Solution.
Hi @LuITS,
The DatasourceId you see from PowerShell/REST get datasources is not the semantic model (dataset) ID. It’s the bound data source ID (gateway/internal binding), so it won’t match your upstream semantic model GUIDs. That behavior is by design (docs).
# Requires Fabric admin rights (or service principal) and Admin API settings Connect-PowerBIServiceAccount $body = @{ workspaces = @(@{ id = "<workspace-guid>" }); lineage = $true } | ConvertTo-Json $start = Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/workspaces/scan" -Method Post -Body $body $scanId = ($start | ConvertFrom-Json).id do { Start-Sleep -Seconds 2 $res = Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanStatus/$scanId " -Method Get | ConvertFrom-Json } until ($res.status -eq "Succeeded") $result = Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/$scanId " -Method Get | ConvertFrom-Json
Connect-PowerBIServiceAccount $compositeDatasetId = "" $datasources = Get-PowerBIDatasource -DatasetId $compositeDatasetId $upstream = foreach ($ds in $datasources) { if ($ds.DatasourceType -eq "AnalysisServices" -and $ds.ConnectionDetails.Server -like "powerbi://*") { [PSCustomObject]@{ SourceServer = $ds.ConnectionDetails.Server SourceDatasetId = $ds.ConnectionDetails.Database } } } $upstream | Format-Table
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Hi @LuITS
As we haven’t heard back from you, we wanted to kindly follow up to check if the suggestions provided by the community members for the issue worked. Please feel free to contact us if you have any further questions.
Thanks and regards
Hi @LuITS
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you
Hi @LuITS
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
Hi @LuITS,
The DatasourceId you see from PowerShell/REST get datasources is not the semantic model (dataset) ID. It’s the bound data source ID (gateway/internal binding), so it won’t match your upstream semantic model GUIDs. That behavior is by design (docs).
# Requires Fabric admin rights (or service principal) and Admin API settings Connect-PowerBIServiceAccount $body = @{ workspaces = @(@{ id = "<workspace-guid>" }); lineage = $true } | ConvertTo-Json $start = Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/workspaces/scan" -Method Post -Body $body $scanId = ($start | ConvertFrom-Json).id do { Start-Sleep -Seconds 2 $res = Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanStatus/$scanId " -Method Get | ConvertFrom-Json } until ($res.status -eq "Succeeded") $result = Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/admin/workspaces/scanResult/$scanId " -Method Get | ConvertFrom-Json
Connect-PowerBIServiceAccount $compositeDatasetId = "" $datasources = Get-PowerBIDatasource -DatasetId $compositeDatasetId $upstream = foreach ($ds in $datasources) { if ($ds.DatasourceType -eq "AnalysisServices" -and $ds.ConnectionDetails.Server -like "powerbi://*") { [PSCustomObject]@{ SourceServer = $ds.ConnectionDetails.Server SourceDatasetId = $ds.ConnectionDetails.Database } } } $upstream | Format-Table
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.