Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
22 | |
17 | |
11 | |
11 | |
9 |
User | Count |
---|---|
35 | |
28 | |
18 | |
18 | |
14 |