Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I was trying to Get Data from REST API which is working properly in Postman but unable to connect in power bi desktop.
Please find the error message below. Even if i use Anonymous its not connecting.
Details: "The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Referer"
Please help me out in resolving this issue.
Thanks,
Suma
I would be helpful to see your postman example and the M code for the query you are using on Power BI
Hi,
Please find the sample postman config.
GET http://serve:port/path
Authorization:"Basic <encoded String>"
Content-Type:text/plain
X-SECURITY_TOKEN:some codevalue
X-USER_TOKEN:email
And in power bi below is the power query
let
Source = "http://sample:700/path/",
Options= [
Headers=
[
#"Content-Type"="text/plain",
#"X-SECURITY_TOKEN"="token ",
#"X-USER_TOKEN"= "email@.com",
#"Authorization"="Basic encoded code"
]
],
result = Web.Contents(Source, Options),
toTable=Table.FromRecords({result})
in
Source
Please help me in resolving the issue.
Thanks,
Suma
Remove #"Authorization"="Basic encoded code" from the Headers in your M code, then in the Data source settings, change the permissions type from Anonymous to Basic, then you should be prompted for a user name and password.
Give that a shot
Hi
i have tried your solution but its not connecting.
Whereas its connecting in Postman with same credentials.Please find the screen below
Thanks,
Suma
Without seeing the full URL, it is kind of hard, but normally you authenticate against the base URL, so maybe change your M code to the following, by moving the portion after the base URL to the RelativePath option. Additionally, if you are passing parameters as well in the URL, then those should move to the Query option
let
Source = "http://sample:700",
Options= [
RelativePath="PUT YOUR STATIC PATH, AFTER BASE URL HERE",
Headers=
[
#"Content-Type"="text/plain",
#"X-SECURITY_TOKEN"="token ",
#"X-USER_TOKEN"= "email@.com",
]
],
result = Web.Contents(Source, Options),
toTable=Table.FromRecords({result})
in
Source
Hi,
I am trying to connect to Amazon Web services.
So the url is an ec2 instance Ex:http://ec2-servername:port.
I have tied connecting by passing Relative path in options but i got below issue.
Thanks,
Suma
Unfortunately without being able to troubleshoot it myself, I probably can't help any further
Maybe someone else on the community has more experience with your particular use case
Good luck,
Ok Thank You for your assistance.
Thanks,
Suma
Hi
Can anyone please assist me on this issue.
Thanks,
Suma
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |