Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
4 | |
3 | |
3 | |
2 |