Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Azure AD Graph API call
Azure AD Graph API - INIT
request_id = str(uuid.uuid4())
# url = '{0}/{resource-path}?[query-parameters]'
url = ''
tenant = ''
headers = {
'User-Agent': 'python_tutorial/1.0',
'Accept': 'application/json',
'Authorization': 'Bearer %s' % token,
'Content-Type': 'application/json',
'client-request-id': request_id,
'return-client-request-id': 'true'
response =, headers=headers)
json_response = {"result": "An error occurred"}
json_response = response.json()'GRAPH RESPONSE: %s' % response)'GRAPH RESPONSE json: %s' % json_response)
Azure AD Graph API - END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.