Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Dragon496
Helper I
Helper I

Get-activityevents the continuation URL is sometimes going to the wrong address!

I am aware my subject title is quite a statement-let me explain…

The following is a snippet from my code

 

if (!$result.continuationUri)
{
Add-Content -Path 'debug.txt' -Value ' next activity call '
Add-Content -Path 'debug.txt' -Value $activityAPIUrl
$result = Invoke-PowerBIRestMethod -Url $activityAPIUrl -method Get | ConvertFrom-Json
}
else {
Add-Content -Path 'debug.txt' -Value ' next activity continuation call '
Add-Content -Path 'debug.txt' -Value $result.continuationUri
$result = Invoke-PowerBIRestMethod -Url $result.continuationUri -method Get | ConvertFrom-Json
}

 

 

Now when it fails, I have noticed the following:-
firstly it only fields when making the call using the continuation token

 

Secondly, when it fails, it is calling the wrong URL.

 

Please note, from the code above, when there is a continuationUri, then this URL is used in the next call.

 

The original URL used is:-

admin/activityevents?startDateTime=…

 

The continuationUri, when it works is:-

https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='LDIwMjMtMDIt…

 

However, when it fails, the continuationUri is:-

https://wabi-uk-south-b-primary-redirect.analysis.windows.net/v1.0/myorg/admin/activityevents?contin...

 

Any idea why the continuationUri is sometimes incorrect?

 

Thanks

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.