Microsoft 365 Actions Setup
You can configure Glean Assistant and Agents to export any generated response to a Word Document, Excel Spreadsheet, or as an email draft in Outlook.
Prerequisites
- You are a Glean admin with access to the Admin Console and the Actions page in Glean.
- Your organization has an existing Microsoft 365 (O365) data source configured in Glean. During setup, you will select this data source as the instance where Word documents and Excel spreadsheets are created in OneDrive.
- Your Microsoft 365 tenant allows registration and configuration of applications in Microsoft Entra ID (Azure AD), and you or a collaborating Microsoft 365 admin can:
- Register a new app.
- Create and manage client secrets.
- Configure delegated API permissions.
- Configure redirect URIs and tenant-wide consent for enterprise applications.
- If you plan to use the Central OAuth option, your tenant can authorize the default Glean OAuth app when users or admins are prompted to connect the action.
- If you plan to use a Custom OAuth app:
- You know or can obtain your Tenant ID.
- You can configure the tenant specific authorization and token URLs.
- You can grant admin consent for the app in Enterprise applications after saving the configuration in Glean.
Setup instructions
Follow these steps to setup the Microsoft 365, Microsoft teams, Excel and Outlook extension actions pack:
-
In Glean, go to the Admin console → Platform → Actions.
-
Click Add.
-
From the list in the Add pre‑set actions section, select Microsoft 365 Actions under Action templates.
-
In the Configuration tab:
- Add the Instance Name.
- Select Datasource Instance to link this action to your Microsoft 365 instance.
- Configure authentication. Microsoft 365 actions use user OAuth so that actions run as the signed‑in user and respect their permissions. You can either use a central Glean‑managed app (recommended where available) or configure a custom OAuth app in Microsoft entra admin center.
Scopes for other Microsoft apps
If you want to integrate with other Microsoft services, you can reuse the same Azure app. Add the required scopes in both Azure and Glean:
- OneDrive —
Files.ReadWrite,Files.Read.All - Teams —
Channel.Create,Channel.ReadBasic.All,ChannelMessage.Read.All,ChannelMessage.ReadWrite,ChannelMessage.Send,ChannelSettings.ReadWrite.All,Chat.Create,Chat.Read,Chat.ReadBasic,Chat.ReadWrite,Chat.ReadWrite.All,ChatMessage.Read,ChatMessage.Send,Directory.ReadWrite.All,Group.ReadWrite.All,offline_access,People.Read.All,Presence.ReadWrite,Team.Create,Team.ReadBasic.All,TeamMember.ReadWrite.All,TeamsActivity.Read,TeamsActivity.Send,User.Read,OnlineMeetings.ReadWrite - SharePoint —
List.Read - Excel —
Files.ReadWrite,Sites.ReadWrite.All,offline_access,User.Read
After scopes are added, you can configure additional auth configs in Glean for each service.
Verification steps
Microsoft 365 actions
-
After you set up Microsoft 365 Actions, open Glean Assistant and export a response to Word, Excel, or an Outlook email draft. Choose Connect and sign in the first time. If Connect is blocked by policy, see Admin approval for using the action.
-
In Glean Assistant, try prompts such as "Draft an email summarizing …" or "Create a doc with …" and confirm Glean suggests the Microsoft 365 actions at the end of the response when they apply.
Microsoft 365 extension actions
-
After you set up Microsoft Teams, Microsoft Excel, or Microsoft Outlook extension actions, open Agent Builder, add a workflow step that uses Microsoft Teams, Excel, or Outlook, and run the agent. Confirm the step runs successfully after you Connect and authorize when prompted. If your organization requires it, complete the one-time admin connection for Teams, Excel, and Outlook extension actions before asking other users to run those steps.
-
In Glean Assistant, try requests that trigger Teams, Excel, or Outlook extension behavior, for example prompts about posting or replying in Teams, working with an Excel workbook, or Outlook tasks beyond a simple export-to-draft flow.
Admin approval for using the action
Applies to Microsoft 365 Actions and to Microsoft Teams, Microsoft Excel, and Microsoft Outlook extension packs. Extension packs may also need One-time admin connection for Teams, Excel, and Outlook extension actions.
The first time someone uses one of these actions, they are prompted to Connect and authorize the application.
Depending on your Microsoft Entra ID tenant policies, end users may be blocked until an administrator grants admin consent for the app. If a user sees a message that they must request approval from an admin when they choose Connect, a Microsoft 365 admin should complete Grant admin consent in Enterprise applications. This is a one-time step for the whole organization.
Grant admin consent in Enterprise applications
- In the Azure portal, open Enterprise applications.
Central (Glean-managed) OAuth app
- Search for Glean, open the enterprise application, and go to the Permissions tab.
- Select Grant admin consent for Glean Technologies.
Custom OAuth app
- Search for your registered application name, open it, and go to the Permissions tab.
- Select Grant admin consent for your tenant (the exact label matches your directory name).
After admin consent is granted, users can usually connect without a separate admin approval step, unless other tenant policies still restrict consent.
One-time admin connection for Teams, Excel, and Outlook extension actions
If you use Microsoft Teams, Excel, or Outlook extension actions, a Glean admin must complete OAuth once after the action pack is created so permissions are allowed for your environment:
- Create an autonomous agent.
- Add a workflow step that uses Microsoft Teams, Excel, or Outlook.
- Choose Connect and sign in as an admin to authenticate and approve the requested permissions on behalf of users, as prompted.
(Optional) Restrict access to specific tenants
If you are using your own custom OAuth app and want to limit access to only the tenant of your organization or specific tenants, follow the steps below to restrict the access:
- Go to the Azure portal.
- Click App registrations.
- Click + New registration.
- Fill up the Register an application form.
- Add the Name.
- For Supported account types, select Multiple Entra ID tenants and Allow only certain tenants (Preview).
Select Allow all tenants to permit authentication from any Microsoft organization. Only enable this option if your application is intended for public use.
- Click Manage allowed tenants.
- Click Add and add the tenant ID or domain name of each organisation you want to allow.
- Click Apply.
- (Optional) Add the Redirect URI.
- Click Register.
Related documentation
- To see more information on Microsoft connectors, see Microsoft connectors.
- To see more information on how to register an app, see Register an app.
- After you have set up the Microsoft 365 Action, refer to the Microsoft 365 agent article on how to test this action pack in the agent builder.




