Microsoft 365 Integration
This guide shows you how to connect the Microsoft 365 integration to your Scout workspace by registering an app in Microsoft Azure and configuring OAuth2 credentials.
Overview
The Microsoft 365 integration allows you to interact with SharePoint sites, document libraries, and OneDrive files directly from Scout, enabling automated file management and data access.
Getting Started
Prerequisites
- A Microsoft 365 account with admin access
- Access to Azure Portal (Microsoft Entra ID / Azure Active Directory)
- Scout workspace
Step 1: Register an App in Microsoft Azure
To connect Scout to Microsoft 365, you’ll need to register the application in the Azure Portal and configure OAuth2 credentials.
1. Navigate to Azure Active Directory (Microsoft Entra ID)
- Log in to the Azure Portal at https://entra.microsoft.com/#home
- In the sidebar, navigate to App registrations under Entra ID
2. Register a New Application
- Click New registration
-
Fill in the app details:
- Name: Enter a descriptive name (e.g., “Scout Integration”)
- Supported account types: Select the appropriate option for your organization
- Redirect URI:
- Select Web as the platform
- Enter:
https://studio.scoutos.com/oauth/microsoft365/success
-
Click Register
3. Configure API Permissions
Your application needs specific Microsoft Graph API permissions to access SharePoint and OneDrive.
- In your registered app, navigate to API permissions in the left sidebar
- Click Add a permission
- Select Microsoft Graph
- Select Delegated permissions
- Add the following permissions:
Sites.Read.All- Read items in all site collectionsUser.Read- Sign in and read user profileoffline_access- Maintain access to data you have given it access to
- Click Add permissions
4. Create a Client Secret
- In your registered app, navigate to Certificates & secrets in the left sidebar
- Under Client secrets, click New client secret
- Add a description (e.g., “Scout Integration Secret”)
- Select an expiration period
- Click Add
- Important: Copy the secret Value immediately - you won’t be able to see it again
- Keep this secret secure - it provides access to your Microsoft 365 data
5. Get Your Application (Client) ID
- Navigate to the Overview page of your registered app
- Copy the Application (client) ID - you’ll need this for the next step
Step 2: Connect to Scout
- In your Scout workspace, navigate to https://studio.scoutos.com/integrations
- Find the Microsoft 365 integration
- Click Add Workspace or Connect
- Enter your Microsoft Azure app credentials:
- Client ID: Paste your Application (client) ID
- Client Secret: Paste your client secret value
-
Click Connect with OAuth
-
You will be redirected to Microsoft to authorize the connection
- Sign in with your Microsoft 365 account
- Review and accept the requested permissions
- You’ll be redirected back to Scout
- You should see that the integration is connected successfully
Step 3: Verify the Connection
- You can test your connection by giving one of your agents access to the Microsoft 365 integration in the agent tools section.
- Ask your agent to search for files in your SharePoint or OneDrive:
- Example: “Search for files containing ‘quarterly report’ in Microsoft 365”
- Example: “List files in my OneDrive”
For more information on Agent tools, please refer to the AI Agents page
Available Capabilities
The Microsoft 365 integration provides the following capabilities:
- Search Files: Search across SharePoint sites and OneDrive for files by name or content
- Get File Content: Download and read file contents
- Text files (.txt, .json, .xml, .csv) returned as readable text
- Word documents (.docx) with automatic text extraction
- Other files (Excel, PDFs, images) returned as base64-encoded data
Best Practices
- Keep credentials secure - Your Client ID and especially Client Secret provide access to your Microsoft 365 data
- App Naming: Use descriptive names for your Azure app registration to easily identify its purpose
- Minimal Permissions: Only grant the API permissions you actually need
- Secret Expiration: Set calendar reminders to renew client secrets before they expire
- Regular Review: Periodically review and clean up unused app registrations in Azure
Troubleshooting
Common Issues
- “Invalid client credentials”: Verify you copied both the Client ID and Client Secret correctly
- “Insufficient permissions”: Check that your Azure app has all required Microsoft Graph API permissions
- Ensure admin consent has been granted if required by your organization
- “Redirect URI mismatch”: Verify the redirect URI in your Azure app matches exactly:
https://studio.scoutos.com/oauth/microsoft365/success - “Token expired”: The integration automatically refreshes tokens, but if you encounter this error, try disconnecting and reconnecting
- “App not found”: Ensure your app registration is active in the Azure Portal
Support
If you encounter issues with the Microsoft 365 integration, please refer to: