Forum Discussion
Operation returned an invalid status code 'Unauthorized' at GetReportInGroupWithHttpMessagesAsync
Hi Anonymous ,
According to this document, there is a note:
When using a service principal, it's recommended to limit its access to the tenant settings using a security group. To learn more about this feature, see these sections in the service principal article:
So, try to change the Apply option to The entire organization.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please considerAccept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Thank you for your reply.
But it's recommended to limit its access to the tenant settings using a security group (which the IT team has created with the new security group and I am already added to the same group).
Is it necessary to change to 'The Entire Organization' as we want for the limited employee in the organization, not the entire organization?
- v-yanjiang-msft4 years ago
Community Support
Hi Anonymous,
Sorry I misunderstood it, I found some solved thread about this problem for your reference:
Power Bi REST API - 401 Authorization error when u... - Microsoft Power BI Community
Unauthorized response on GetReportInGroupAsync PowerBI Embedded API call using Service Principal
Unauthorized (401) listing synchronization jobs for service principal in MS Graph API - Microsoft
Hope it helps!
Best Regards,
Community Support Team _ kalyjIf this post helps, then please considerAccept it as the solution to help the other members find it more quickly.