Skip to content

Instantly share code, notes, and snippets.

@jpda
jpda / graph-nolib.py
Created January 25, 2019 20:24
Microsoft Graph from Python only using requests
import logging
import requests
import json
def main():
client_id = "<CLIENT ID>"
client_secret = "<CLIENT SECRET>"
resource_id = "https://graph.microsoft.com"
tenant = "<TENANT NAME OR GUID> (like microsoft.com or jpd.ms)"
graph_query = "<GRAPH PATH> - example: users/john@jpd.ms"