Category : microsoft-graph-api

I am following this guide to upload files programmatically to OneDrive using the MSAL python library. I upload large files in chunks and sometimes a chunk upload fails returning the code 500 at this point: chunk_data_upload = requests.put(upload_session[‘uploadUrl’], data=chunk_data, headers=headers) This shows a (temporary?) problem at the server end, correct? Is there a mechanism to ..

Read more

I am trying to fetch Outlook calendar events in Python scripts using API provided by Microsoft Graph. I have created an Azure account using my personal Outlook account ([email protected]), after that I activated the account using student identity. Then I have created an application following the instructions. In order to get access to my calendar ..

Read more

I’m using Microsoft Graph API Beta version to delete an access package. However, for deleting an access package, I need first to remove all its assignments. For doing this, I found on the official doc the accessPackageAssignment object (https://docs.microsoft.com/en-us/graph/api/resources/accesspackageassignment?view=graph-rest-beta). When I perform a get request on the assignment: result = azureAdBeta.get(‘/identityGovernance/entitlementManagement/accessPackageAssignments/’ + accessPackageAssignmentId) the response ..

Read more

Well, I’ve registered a new app with following permissions Now then i run this code from O365 import Account CLIENT_ID = ‘xxxx’ SECRET_ID = ‘xxxx’ TENANT_ID = ‘xxxx’ credentials = (CLIENT_ID, SECRET_ID) account = Account(credentials, auth_flow_type=’credentials’, tenant_id=TENANT_ID) if account.authenticate(): print(‘Authenticated!’) schedule = account.schedule(resource=’[email protected]’) calendar = schedule.get_default_calendar() events = calendar.get_events(include_recurring=False) for event in events: print(event) I ..

Read more

I have a function app in azure that needs to read AAD group information. This function app has system assigned managed identity enabled and the MSI has Directory.ReadAll permission on Microsoft Graph. I use this code to get list of AAD Groups: from azure.graphrbac import GraphRbacManagementClient from msrestazure.azure_active_directory import MSIAuthentication import logging MSI_credential = MSIAuthentication(resource="https://graph.windows.net") ..

Read more