Forum Discussion
Power BI Rest API continuation token is corrupted
- Anonymous6 years ago
Hi Anonymous
Yes, yous should not use the continuationToken, but the continuationUri, and use it to make a new get request.
The documentation for this API is poor and outdated, unfortunately.
Let me know if you need further assistance.
Hi,
I got the same error when building PowerAutomate Flow to retreive PBI activity events using custom connector based on Swagger https://github.com/microsoft/powerbi-rest-api-specs/blob/master/swagger.json .
Turned out that the continuation token needs to be decoded for the 'Returns a list of audit activity events for a tenant' step to work properly.
In MS Flow - Parse the continuation token from Json, then decode with function decodeUriComponent() and finally wrap the expression in single quotes.
eg. 'decodeUriComponent(body('Parse_JSON')?['continuationToken'])'
PowerShell does it behind the scene like this:
...
string formattedContinuationToken = $"'{WebUtility.UrlDecode(response.ContinuationToken)}'";
response = client.Admin.GetPowerBIActivityEvents(null, null, formattedContinuationToken, null);
...