Forum Discussion
perhed
5 years agoNew Member
.Net GetActivityEventsAsync fails with Bad Request
Hi! I am trying really hard to download the power bi logs but I'm failing miserabely. The service principal is set to access the Power BI API and the user is a Power BI Admin and has a Power ...
- 5 years ago
The problem was solved by enclosing the dates in single quotes:
var logs = await client.Admin.GetActivityEventsAsync(startDateTime:string.Format("'{0:yyyy-MM-ddTHH:mm:ss.FFFZ}'", loopStart), endDateTime:
string.Format("'{0:yyyy-MM-ddTHH:mm:ss.FFFZ}'", loopEnd));
If you use ContinuationToken make sure to both enclose it in sinqle quotes and UrlDecode it before passing it as a parameter.
V-lianl-msft
5 years agoCommunity Support
Hi perhed ,
Unfortunately, I couldn't do more testing.
You could try to create a support ticket. If you have a Pro account it is free.
https://powerbi.microsoft.com/en-us/support/
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.