Category : outlook

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 am using a script that copies an excel sheet and pastes it into outlook but I am wondering if there’s a way to copy the formatting and colour coding aswell? Here is the script import win32com.client as client import pandas as pd workbook_path = r’C:sheettoexcelexcel.xlsx’ df = pd.read_excel(workbook_path, sheet_name="Sheet1",index_col=False, nrows = 10, usecols = ..

Read more

Today I’m trying to do read calendar from outlook. I created a new app through Microsoft Azure then setted a secret key and added a api permissions. When I was trying to authenticate via simple script I caught an error The request is not valid for the application’s ‘userAudience’ configuration. In order to use /common/ ..

Read more

I’d want to gain access to a Generic Mail Box (Shared Mail Box) and retrieve the attachments from an unread email. The problem is that the mail box does not have a password, however imap.login(user, password) requires a password. with MailBox(‘imap.outlook.com’).login(‘[email protected]’, "") as mailbox: for msg in mailbox.fetch(AND(seen=False)): for att in msg.attachments: print(att.filename, att.content_type) files.append(att.filename) ..

Read more