Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
5 | |
4 | |
4 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |