Forum Discussion
Powershell Get-PowerBIDataflowDatasource Not Returning Data Source Folder Path
Hi s2online,
this is a known limitation with the Get-PowerBIDataflowDatasource cmdlet. The underlying DatasourceConnectionDetails object in the PowerShell module just doesn't have a Path property mapped for Folder-type data sources, even though the REST API clearly returns it. Looks like the SDK's object model wasn't updated to cover every property the API can return.
Since you've already confirmed the REST call gives you what you need, your best bet is to just skip the cmdlet for this specific property and pull it straight from the REST response instead. Something like:
powershell
$response = Invoke-PowerBIRestMethod -Method Get -Url "/groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/dataflows/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/datasources" $data = $response | ConvertFrom-Json ForEach ($ds in $data.value) { if ($ds.datasourceType -eq "Folder") { Write-Host $ds.connectionDetails.path } }
This way you get the raw JSON and can pull out path directly, bypassing the cmdlet's incomplete object mapping entirely.
If you want this fixed properly in the module (not just worked around), it's worth raising it as an issue on the MicrosoftPowerBIMgmt GitHub repo since this seems like a genuine gap in how they're deserializing the connection details.