I'm trying to find a way to get power bi dataset tables (Automated way). I tried using Powershell rest API:
$tablesUrl = "https://api.powerbi.com/v1.0/myorg/datasets/$datasetId/tables"
# Invoke the REST API to get dataset tables
$tablesResponse = Invoke-PowerBIRestMethod -Url $tablesUrl -Method GET
$tables = $tablesResponse.value
# Process the retrieved tables
foreach ($table in $tables) {
Write-Host "Table Name: $($table.name)"
# Add any additional logic to process the table information as needed
}
But it's only working with the push dataset. Is there another way?