I have integrated adal.js library in my dynamic crm custom solution. I can get token easily but when trying to call power bi rest api using the following code below getting 403 unauthorized status:
var headers = new Headers();
var bearer = "Bearer " + token;
headers.append("Authorization", bearer);
var options = {
method: "GET",
headers: headers
};
var graphEndpoint = "https://api.powerbi.com/v1.0/myorg/reports";
fetch(graphEndpoint, options)
.then(function (response) {
//do something with response
console.log(response);
});
Do I need to use username and password and how to use it using adal.js, any suggestion?
I have integrated adal.js library in my dynamic crm custom solution. I can get token easily but when trying to call power bi rest api using the following code below getting 403 unauthorized status:
Do I need to use username and password and how to use it using adal.js, any suggestion?
Thanks in advanced.