Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Guys,
Newbie here for both Power BI and Javascript. Based on my code below, it seems it gives me an 'access' code but when I use it as a bearer token to get the embed token it throws an 403 forbidden error when I try/simulate it via Postman. However, if I get the access token via Postman I can use the returned access token and use that to get the embed token.
Programatically:
// Add here scopes for access token to be used
const tokenRequest = {
scopes: ["openid", "user.read"]
};
const myMSALObj = new Msal.UserAgentApplication(msalConfig, function (errorDes, token, error, tokenType, instance) {
// this callback is called after loginRedirect OR acquireTokenRedirect. It's not used with loginPopup, acquireTokenPopup.
if (error) {
console.log(error + ": " + errorDes);
}
else
console.log("Token type = " + tokenType);
});
debugger;
myMSALObj.loginPopup(loginRequest)
.then((loginResponse) => {
//Login Success callback code here
debugger;
console.log("id_token acquired at: " + new Date().toString());
console.log(loginResponse);
myMSALObj.acquireTokenSilent(tokenRequest).then(function (accessTokenResponse) {
// Acquire token silent success
// Call API with token
debugger;
let accessToken = accessTokenResponse.accessToken;
Postman (see attachment)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |