Skip to main content
Microsoft 365 is a product family of productivity software, collaboration and cloud-based services owned by Microsoft. Note: Office 365 was rebranded as Microsoft 365.
This notebook walks through connecting LangChain to Office365 email and calendar. To use this toolkit, you need to set up your credentials explained in the Microsoft Graph authentication and authorization overview. Once you’ve received a CLIENT_ID and CLIENT_SECRET, you can input them as environmental variables below. You can also use the authentication instructions from here.

Assign environmental variables

The toolkit will read the CLIENT_ID and CLIENT_SECRET environmental variables to authenticate the user so you need to set them here. You will also need to set your OPENAI_API_KEY to use the agent later.

Create the toolkit and get tools

To start, you need to create the toolkit, so you can access its tools later.

Use within an Agent