Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm blocked and I need your help. I would like to do on PowerBI a POST API request on a TFS server which works fine on Postman but I always the same issue on PBI:
DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously.
Details:
DataSourceKind=Web
DataSourcePath=http://{instance}/DefaultCollection/{project}/_apis/wit/
The request is:
let url = "http://{instance}/DefaultCollection/{project}/_apis/wit/wiql?api-version=3.0", content = " {""query"": "" SELECT * FROM WorkItemLinks WHERE ([System.Links.LinkType] = 'System.LinkTypes.Dependency-Forward') AND Source.[System.WorkItemType] = 'Requirement' AND Source.[System.State] <> 'Closed' AND ( Target.[System.WorkItemType] = 'Task' OR Target.[System.WorkItemType] = 'Bug') AND Target.[System.State] <> 'Closed' ORDER BY [System.Id] ASOF '1/1/15' mode(maycontain)"" }", Source = Json.Document(Web.Contents(url,[Headers = [#"Content-Type"="application/json"], Content = Text.ToBinary(content) ] )) in Source
As said below, on Postman, it works fine using NTLM Authentication method. So I do not known if the issue coming from the authentication method used on powerbi (basic GET API rest method works) or if the method is not correctly written ...
Hi @Anonymous ,
For the error message, I think you didn't choose Anonymous authentication for the web data source.
Please open Data Source Settings, then find the web data source, choose Anonymous like below:
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @v-xuding-msft
I already tried this solution, but it doesn't work:
I also tried a POST request which doesn't need authentication, and every thing is ok, I suppose that I need to include authentication parameters into my request.
After several investigations I found the issue but I didn't find the solution yet ...
Using basic authentication, when I run the query I have following issue :
"Expression.Error: 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"
So, I changed the connection setting but, when I try to connect with Anonymous access to TFS I have following issue:
I tried with the TFS2017 OnPrem version of my compagny, with my personal ADOS, still the same issue, I couldn't connect to TFS anonymously ... Any idea ?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
98 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |