Forum Discussion
Anonymous
3 years agoNot applicable
Unable to send a POST Request in Power Query
Hi, I need to send a POST request to generate an access token in Power Query. In Power BI Desktop, a POST request is sent, and it works as expected. However, when I try to refresh after publishin...
Poohkrd
3 years agoAdvocate I
Hi! Try this code:
let
base_url = [base_url],
client_secret = [client_secret],
Source = Json.Document(Web.Contents(base_url,
[
RelativePath = "oauth/issueToken",
Headers = [#"Content-Type"="application/json"],
Content=Json.FromValue([
grant_type = "client_credentials",
client_id = "powerbi_client",
client_secret = client_secret
])
]
)),
token = Source[access_token],
- Anonymous3 years agoNot applicable
Thanks for the reply, seems it doesn't resolve the existing issue