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.
I am attempting to hand this report off to a client. I am connecting to their API via my developer credentials. I want to create a parameter so that when they open the report they have to enter their credentials to access the API. I have passed a paramter for the original API link. But I am unable to pass a parameter for where I normally enter my username and password within the query. What are my options? I have bolded the problem areas
let
GetAuth = Web.Contents(#"API",
[
Headers = [#"Accept"="application/json",
#"Content-Type"="application/x-www-form-urlencoded;charset=UTF-8"],
Content = Text.ToBinary("username=#"User Name"&password=#"Password"&grant_type=password")
]),
FormatAuthAsJson = Json.Document(GetAuth),
access_token = FormatAuthAsJson[access_token],
ReportData = Json.Document(Web.Contents(#"API2",
[
Hi @AKWills,
AFAIK, there are lots of methods to verify credentials, they can be attached to the header, contents(your method), query with different authorizations modes. (basic name/password or encrypted tokens and API keys...)
I'd like to suggest you contact the API developers to confirm what type of authorizations they used.
BTW, please also check the encoding of binary text if they work on the API, the basic base64 encode may not suitable with all scenarios.
Regards,
Xiaoxin Sheng
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 |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |