Skip to content

Commit 24aa691

Browse files
authored
Merge pull request #5 from Azure-Samples/jsonpretty
format the json output
2 parents 12118ab + 933993e commit 24aa691

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

1-Call-MsGraph-WithSecret/confidential_client_secret_sample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
graph_data = requests.get( # Use token to call downstream service
6161
config["endpoint"],
6262
headers={'Authorization': 'Bearer ' + result['access_token']}, ).json()
63-
print("Graph API call result: " + str(graph_data))
63+
print("Graph API call result: ")
64+
print(json.dumps(graph_data, indent=2))
6465
else:
6566
print(result.get("error"))
6667
print(result.get("error_description"))

2-Call-MsGraph-WithCertificate/confidential_client_certificate_sample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
graph_data = requests.get( # Use token to call downstream service
6161
config["endpoint"],
6262
headers={'Authorization': 'Bearer ' + result['access_token']}, ).json()
63-
print("Graph API call result: " + str(graph_data))
63+
print("Graph API call result: ")
64+
print(json.dumps(graph_data, indent=2))
6465
else:
6566
print(result.get("error"))
6667
print(result.get("error_description"))

0 commit comments

Comments
 (0)