X
Xavier Castañer
Guest
Xavier Castañer Asks: Angular Power Bi integration CORS problem
everyone.
I've been trying for days to POST-call this Microsoft Power Bi's endpoint https://login.microsoftonline.com/common/oauth2/token which generates an access_token.
If called from Postman it returns a 200 OK like it's supposed to, plus the access_token I need to later call another endpoint (https://api.powerbi.com/v1.0/myorg/GenerateToken) for the embed_token, which also works in Postman.
The problem is that the ouath2/token endpoint always returns ERR_FAILED 400 with a CORS error on top of it.
I seriously don't know what I'm doing wrong. I feel like the Request Headers and Body are the way they are supposed to be, since they look the same in Postman and Angular.
As you can see here, I even tried to cleanse the HttpClient with fresh new headers not attached to our current solution/boilerplate (we use ASP.NET Zero), but still the same issue remains.
everyone.
I've been trying for days to POST-call this Microsoft Power Bi's endpoint https://login.microsoftonline.com/common/oauth2/token which generates an access_token.
If called from Postman it returns a 200 OK like it's supposed to, plus the access_token I need to later call another endpoint (https://api.powerbi.com/v1.0/myorg/GenerateToken) for the embed_token, which also works in Postman.
The problem is that the ouath2/token endpoint always returns ERR_FAILED 400 with a CORS error on top of it.
I seriously don't know what I'm doing wrong. I feel like the Request Headers and Body are the way they are supposed to be, since they look the same in Postman and Angular.
As you can see here, I even tried to cleanse the HttpClient with fresh new headers not attached to our current solution/boilerplate (we use ASP.NET Zero), but still the same issue remains.