Creating app in Azure and enabling API access for PowerBI
Creating app in Azure and enabling API access for PowerBI
to get required endpoints for Microsoft login and a token for authentication for calling the official
PowerBI rest API.
(Official documentation)
Step 1 : Sign in to Azure portal and search for app registration and click on it.
Application Name
Supported account type
Redirect URI (optional could be setup later) and a platform for it.
Step 4: Upon successful registration the application page will open and from there Application
(client) ID and Directory (tenant) ID would be required in the node app for setting up login. Next ,
click on Certificates & secrets.
Step 5: Inside Certificates & secrets click on New client secrets inside it select a description and
expiration period of client secrets and click on add.
Step 6: Upon the token generation copy its value and save it in a secure location( Value is one time
view only so make sure to store it somewhere). This secret will also be required in the node app.
Step 7: Migrate to API permission and add required PowerBI service.
(In API permission Admin consent might be required for calling API not sure as of now, in API
permission )
Note : If you want to enable service principal access for the entire organization, skip this step.
In PowerBi admin portal , go to Tenant settings, and scroll down to Developer settings.
Enable Embed content in apps either for the entire organization or for the specific security
group you created in Microsoft Entra ID.
Enable Allow service principals to use Power BI APIs either for the entire organization or for
the specific security group you created in Microsoft Entra ID.
Step 10: Add a service principal or security group manually
In the Power BI service, scroll to the workspace you want to enable access for. From its More
menu, select Workspace access.
In the Access pane, under Add admins, members, or contributors, add one of the following:
o Your service principal. The name of your service principal is the Display name of your
Microsoft Entra app, as it appears in your Microsoft Entra app's overview tab.
o The security group that includes your service principal.
On the dropdown menu, select Member or Admin, and select Add