PowerBI Embedded - GetTables Results in Unauthorized

Receiving an unauthorized response when trying to get tables in data sets. I do not understand why, given that I seem to be unable to retrieve and delete datasets without problems. I did not see the links in the docs about any special steps to be taken?

I end up trying to manipulate the rows, but the row methods also return with an unauthorized response, even when I skip the iteration of the table and go directly to them.

method-- https://msdn.microsoft.com/en-us/library/microsoft.powerbi.api.beta.datasetsextensions.gettables.aspx

static async Task GetTableInformation(string workspaceCollectionName, string workspaceId)
{
    var devToken = PowerBIToken.CreateDevToken(workspaceCollectionName, workspaceId);

    using (var client = await CreateClient(devToken))
    {
        var datasets = client.Datasets.GetDatasets(workspaceCollectionName,workspaceId);

        foreach(var dataset in datasets.Value)
        {
            var tables = client.Datasets.GetTables(workspaceCollectionName, workspaceId, dataset.Id);
            Console.WriteLine("Table count is {0}.", tables.Value.Count);
        }
    }
}
+4
source share
1 answer

, API- push- Power BI Embedded. Power BI API-, , SDK.

+2

All Articles