The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm working with several Power BI API's and they all give me results. I don't use any SDK. I simply perform a HttpWebRequest in C# like this:
HttpWebRequest request;
request = System.Net.HttpWebRequest.CreateHttp(uri);
request.KeepAlive = true;
request.Method = "GET";
request.ContentLength = 0;
request.Headers.Add("Authorization", String.Format("Bearer {0}", AccessToken));
Never a problem with that. However . . . I cannot get the API working in case of the continuationUri for activityEventEntities.
I tried two methods: using the continuationUri and getting an AccessToken by creating a new Azure AD Authentication Library (ADAL) context. This is the normal procedure for avery API. In this case: that gives me a 403-error. This I can understand somehow. There is not only a continuationUri. There is also a continuationToken. Not for nothing I assume. So, I tried the second method.
The second method is calling the API using both the continuationUri and the continuationToken. So I don't ask or create an access token myself. Only there is no difference in the result. Again a 403-error.
My first request is giving good result (including a continuationUri and continuationToken):
Uri = https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='2020-02-23T00:00:00.000Z'&end...'
Token = eyJ0eXAiOiJKV1{etc}
My continuation request (using the received continuationUri and continuationToken) is giving 403 result:
Uri = https://wabi-north-europe-c-primary-redirect.analysis.windows.net/v1.0/myorg/admin/activityevents?co...}'
Token = LDIwMjAtMDItM{etc}
Now my question is: is there anyone who got this API (using the continuationUri for activityEventEntities) working ? If so: how ? What am I doing wrong?
Hi there,
Do you get this to work?
Have been trying to use the token but keep getting an error saying is expecting a literal type even if I enclose the token in single quotes.
Cheers,
liljath
Hi,
Maybe these observations will help you out:
https://community.powerbi.com/t5/Developer/Get-Activity-Events-API-doesn-t-return-activities-when/td...
Best regards, Walter