pypi Office365-REST-Python-Client 2.3.2
v 2.3.2

latest releases: 2.5.8, 2.5.7, 2.5.6...
3 years ago

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

Don't miss a new Office365-REST-Python-Client release

NewReleases is sending notifications on new releases.