Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I'm trying to create app based service principal authentication token using Node JS. I'm able to get token(not sure it's service principal token) able to pass in header as Auth bearer token able to get Embed URL While running embed URL getting Sign in page, what is the issue ? I'm using below code :
/*authentication.js */
async function getAuthenticationToken() {
var adal = require('adal-node');
var AuthenticationContext = adal.AuthenticationContext;
var context = new AuthenticationContext(authorityUrl); context.acquireTokenWithClientCredentials(config.resourceUrl,config.appId,config.clientSecret, function(err, tokenResponse){
if (err) reject(" ~ "+err);
resolve(tokenResponse);
})
}
/* index.js */
var auth = require(__dirname +'/authentication.js');
tokenResponse = await auth.getAuthenticationToken();
var token = tokenResponse.accessToken;
var resd = await utils.sendGetReportRequestAsync(requestParams.url, requestParams.options);
var embed = resd.embedUrl+"&autoAuth=true";
Hi @demo ,
You may refer to the link: https://powerbi.microsoft.com/en-us/blog/pbie-nodejs-sdk/.
If you still have this issue for Power BI, you'd better create a support ticket in Power BI Support to get further help.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 30 | |
| 29 | |
| 20 | |
| 16 | |
| 16 |