Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Solved! Go to Solution.
HI @uma_mahi,
You can try to use the following M query codes if they help for your scenario:
let
url = "https://web-api.xxx.com",
body = "{ 'client_id': '1232cd11-7862-1111-83c2-28f5a0b6ce0a', 'client_secret': 'QopQopQop133111', 'grant_type': 'client_credentials'}",
token_response = Web.Contents(
url,
[
RelativePath = "/auth/connect/token",
Headers = [#"Content-Type" = "application/x-www-form-urlencoded"],
Content = Text.ToBinary(body)
]
),
access_token = Json.Document(token_response)[access_token],
accounts_response = Web.Contents(
url,
[
RelativePath = "/enterprise/v1/accounts",
Headers = [Accept = "application/json", Authoraztion = "Bearer " & access_token]
]
),
Result = Json.Document(accounts_response)
in
Result
Regards,
Xiaoxin Sheng
HI @uma_mahi,
You can try to use the following M query codes if they help for your scenario:
let
url = "https://web-api.xxx.com",
body = "{ 'client_id': '1232cd11-7862-1111-83c2-28f5a0b6ce0a', 'client_secret': 'QopQopQop133111', 'grant_type': 'client_credentials'}",
token_response = Web.Contents(
url,
[
RelativePath = "/auth/connect/token",
Headers = [#"Content-Type" = "application/x-www-form-urlencoded"],
Content = Text.ToBinary(body)
]
),
access_token = Json.Document(token_response)[access_token],
accounts_response = Web.Contents(
url,
[
RelativePath = "/enterprise/v1/accounts",
Headers = [Accept = "application/json", Authoraztion = "Bearer " & access_token]
]
),
Result = Json.Document(accounts_response)
in
Result
Regards,
Xiaoxin Sheng
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |