steps to create PowerBI API token

Bouzari, Mostafa 1 Reputation point
2022-08-23T11:17:57.107+00:00

i'm using this URL https://login.windows.net/(the Tenant ID of the App that i made in Azure AD)/oauth2/token to create a Token for PowerBI API. my postman looks like this:

lKSfM.png

but when i use this Access token to do some operations like getting a list of reports in a Dataset i get 401 Unauthorized:

ksP7k.png

exactly which steps i have taken so far can be seen in this Question. I also haven't created a Service Principal, because i'm using this as embedded in organisation. Am i missing a step?

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
16,586 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Carlos Solís Salazar 12,996 Reputation points
    2022-08-23T12:42:41.95+00:00

    Hi @Bouzari, Mostafa

    Thank you for asking this question on the **Microsoft Q&A Platform. **

    I think you must use an App Registration to connect via API to PowerBI

    Please review this document Register an Azure AD application to use with Power BI

    Hope this helps,
    Carlos Solís Salazar

    ----------

    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.
    NOTE: To answer you as quickly as possible, please mention me in your reply.