Hi Developer,
Thank you for posting your query on Microsoft Q&A. I am Saiteja from Q&A will be assisting you with your query.
Based on your query, here is my understanding: You would like to integrate PowerBi with your application. As per your end goal, I found this article which talks about embed powerBi with app registration. Inorder to make it work you have added three different permissions of which Tenant.ReadWrite.All has been shown as Application permission, and you would like to add the Dataset.ReadWrite.All
and Report.ReadWrite.All
these permissions to the application to get the dataset information using the application.
As you see we have two types of permissions, delegated and application permissions. Delegated permissions are one works on behalf of user which works with both application and user permissions. When it comes to application permissions, application access the data without any user itself which is considered only certain situation where you would like to have an automation and backup.
Since you can see these permissions are only available in delegated permissions which means these are operable on behalf of user itself and there are no same permissions available in application sets.
As per this document, I see you need to have only delegated permissions itself and there is no requirement of this permission Tenant.ReadWrite.All
when accessing with service principal.
I suggest the application permission of Tenant.ReadWrite.All and if you feel it still required, you can add this from delegated permissions only. Once you provide the permissions, make sure you provide admin consent for the application from portal itself, or you can use this link: https://login.microsoftonline.com/{organization}/adminconsent?client_id={client-id}
You need to replace organization with Tenant ID and client ID with app id or client id. This is to avoid any admin consent permissions while accessing the service principle in retrieving the data using PowerBi. You can refer the same in the following document.
One last thing is to enable the setting of "Allow service principals to use Power BI APIs". You Can refer this document for the same.
I hope this information is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly "upvote it". If you have extra questions about this answer, please click "Comment"