A Python client to use the Microsoft Graph API as an application.
import GraphRESTClient as grc
client = grc.GraphRESTClient(
'example.com', {
'client_id' : "********-****-****-****-************",
'scope' : "https://graph.microsoft.com/.default",
'client_secret' : "***********************",
'grant_type' : "client_credentials"
}
)
rep = client.api(
'/v1.0/users'
).select(
['displayName', 'mail']
).top(1).pages(2).get()This request will return the display name and mail for the first user of the 2 first pages.
- More standard API
- POST, PATCH, DELETE methods
- Auth Token management
- Renew Token
- Auto check and renew token