Forum Discussion
Can't access PowerBI Admin APIs via Service Principal/ App Registration
- 3 months ago
Hi RuditMathews,
To sum up :
- Capacities & Groups → Fix by double-checking your tenant settings, SP should work
- Activity Events (most viewed, top users) → You do need a real user account, no workaround with SP
So you only need the real user account specifically for activity-based KPIs.
Hi RuditMathews,
Yes, with those two tenant settings enabled + your existing permissions, your SP can access most Admin APIs.
However, the /admin/activityevents endpoint will still return 401 — this is a Microsoft hard restriction that no permissions or settings can bypass.
Remember that for Activity Events, you must use a real user account (delegated auth) or switch to the Microsoft 365 Audit Log API instead.
Hi oussamahaimoud ,
Im getting 401 response for Activity events, Capacities, groups. So I'm trying to build a dashboard with KPIs like no. of users, most viewed dashboard, top users in a particular dashboard etc. So all the above APIs I can't access. So i'm assuming I should need a real user account for accessing the above endpoints for the mentioned KPIs.
- oussamahaimoud3 months ago
Memorable Member
Hi RuditMathews,
To sum up :
- Capacities & Groups → Fix by double-checking your tenant settings, SP should work
- Activity Events (most viewed, top users) → You do need a real user account, no workaround with SP
So you only need the real user account specifically for activity-based KPIs.