Skip to main content
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Advocate I
Advocate I

Authentication Pain - adal-node



I'm trying to authenticate with Azure AD to access the Power BI APIs, but having some trouble.


I'm using adal-node to write a console app that uses the server to server via client credentials example outlined here.


Unfortunately I can't seem to get access.


If I use as the authority URI (as per the powerbi doc), I get a 404 which seems odd.  If I use the authority URI as per the example for adal-node, I appear to get a token.  On using that token to access though, I get a 403 error.


If anyone is able to shed some light on this, that would be great.


Many thanks,




Frequent Visitor

You should use the authorityHostUrl like this:



var authorityHostUrl = '';
var tenant = '';
var uri = authorityHostUrl + '/' + tenant;
var context = new adal.AuthenticationContext(uri);//Start adal context



Could you please elaborate on this? I am frustrated with the lack of granularity of the refresh process and would like to kick off a dataset refresh via powershell after I complete a number of ETL processes.

Helper II
Helper II

This stackoverflow thread will probably help. Power BI needs user to be involved in authentication. The 403 is 'forbidden' so url is found but permissions not granted.

Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.