Changelog
- #320: escape XML characters in STS request by @andreas-j-hauser
- #310: Revert
ClientObject.get_property()
semantics by @kraptor
- SharePoint API improvements: #303 (addressing versions of ListItem),
hubsite
namespace, File/Folder copy/move operations
- Graph client: initial support for batching
- improved support for Calendar API
Support for batching for Graph client
def acquire_token_client_credentials():
authority_url = 'https://login.microsoftonline.com/{tenant}'
app = msal.ConfidentialClientApplication(
authority=authority_url,
client_id='{client-id}',
client_credential='{client-secret}'
)
result = app.acquire_token_for_client(scopes=["https://graph.microsoft.com/.default"])
return result
client = GraphClient(acquire_token_client_credentials)
current_user = self.client.users['{user-principal-name}'].get() # 1.1: construct query to retrieve user details
my_drive = self.client.users['{user-principal-name}'].drive.get() # 1.2: construct query to retrieve user's drive
client.execute_batch() # 2: submit a query to the server