Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
CONTEXT
I am trying to get the lineage data, user data through PowerBI REST API, to be able to manage the usage of the tool and of the objects (reports, datasets, dataflows, ...) basically doing the admin.
I have tried to configure some simple calls to the API with Postman with the help of this tutorial (How to Call the Power BI REST API from Postman - Carl de Souza). I have set up the App in Azure and I am the owner of the app. The client ID is the tenantID and the secret has been set up
ISSUE
When I try this POST: https://login.microsoftonline.com/common/oauth2/token
I get this error message
Have anyone encountered this before? I have tried looking as some AAD forum threads but nothing that could help me...
Thanks in advance!
Solved! Go to Solution.
I'm not sure if I can help but check this post seems similar:
Thanks,
Kasia
all good now 🙂
using the app client id and the client secret value and all is working well 🙂
If you are using C#, the request to get access token would be as following:
var clientHandler = new HttpClientHandler
{
UseCookies = false,
};
var client = new HttpClient(clientHandler);
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://login.microsoftonline.com/<your_tenant_id>/oauth2/v2.0/token"),
Content = new FormUrlEncodedContent(new Dictionary<string, string>
{
{ "client_id", "<your_client_id>" },
{ "scope", "https://analysis.windows.net/powerbi/api/.default" },
{ "client_secret", "<your_client_secret>" },
{ "grant_type", "client_credentials" },
}),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
To get more details, see: https://kalcancode.wordpress.com/2025/02/18/powerbiclient-how-to-get-access-token/
Did u managed to resolve this issue ?
all good now 🙂
using the app client id and the client secret value and all is working well 🙂
Hi @roxane_cz ,
Please review the solution in the following links, hope they can help you resolve the problem.
REST API Silent Authentication (Token)
The user or administrator has not consented to use the application
Best Regards
I'm not sure if I can help but check this post seems similar:
Thanks,
Kasia
Hi kasia,
thanks for that link!
seems, related, I have tried it but I still have an issue with a parameter, the redirection_uri for this object 😕
so still not working
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
4 | |
3 | |
3 | |
3 |