Forum Discussion
How to retrieve Auth Token with JWT using REST API call in Power BI
Hi SalJav - Power BI allows passing authentication credentials via Web.Contents options rather than adding them manually in the Headers. You need to configure the query to use the Authorization header implicitly through the settings.
sharing the mcode in json format, please check and hope it works.
- SalJav1 year agoFrequent Visitor
Thank you so much for taking time to reply to my query. Unfortunately, I had already tried that with no success. But, I tried your solution again just to make sure and I get the following error:
DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously. Details: DataSourceKind=Web DataSourcePath=path/to/oauth/tokenand also I am not sure if creds in parameters will work for this API, just wanted to give it a run, which is not happening.
Update:
After Running the attached code, I could see the URL in Data Source Settings and set it to Anonymous. And, then tried to run the query again, this time I get a 400 Bad Request Error, which is returned by the API, and which means, it will not accept credentials in Parameters.