Why do I get a 401 (unauthorized) error when using a service principal access token to call the Users.GetUserArtifactAccessAsAdmin API in Power BI?
I am trying to use a service principal to call the Users.GetUserArtifactAccessAsAdmin API in Power BI but keep encountering a 401 (Unauthorized) error. The service principal is properly registered in Azure AD, and I have assigned the necessary API permissions, including Tenant.Read.All and Tenant.ReadWrite.All. Additionally, the service principal has been granted Power BI admin permissions. Despite this setup, the request fails with an unauthorized response. Has anyone encountered this issue? What steps can I take to resolve it?