About Microsoft Graph
Microsoft Graph is a unified API that provides access to Microsoft 365 and Enterprise Mobility + Security (EMS) services. This integration uses OAuth 2.0 Client Credentials flow for server-to-server authentication, enabling workflows to access Microsoft Graph APIs without user interaction.What the Microsoft Graph integration enables
| Capability | Description |
|---|---|
| Automation workflows | Manage mail, calendar, files, device management, security, and compliance tasks automatically through Serval workflows |
| Identity & Access | Manage Entra ID users, groups, and app permissions |
| Knowledge Base | Index SharePoint and OneDrive content for Serval AI |
Serval configuration
Serval supports two methods of connecting with your Microsoft Entra tenant:- Sign in with Microsoft (recommended): Connect the official Serval application with your Microsoft Entra tenant. This method integrates with the Serval bot for Microsoft Teams without additional configuration.
- Custom application: Create your own Microsoft Entra app registration and create credentials for Serval to use. Adding a bot to Microsoft Teams requires creating a custom Teams application and additional configuration.
Sign in with Microsoft
- In Serval, navigate to Apps → Available → Microsoft Graph
- Click Connect to bring up the “Connect” dialog.
- Click “Sign in with Microsoft”. Serval will navigate you to Microsoft to complete sign in.
- When signing into Microsoft, log in using an account that has sufficient permissions for the following scopes:
-
Core identity and directory (readonly)
User.Read- Read user profileUser.ReadBasic.All- Read basic profiles of all usersDirectory.Read.All- Read directory data
-
Groups and team membership (readonly)
Group.Read.All- Read all groupsGroupMember.Read.All- Read group memberships
-
Teams (readonly)
Team.ReadBasic.All- Read basic team infoChannel.ReadBasic.All- Read basic channel infoChannelMessage.Read.All- Read channel messages
-
SharePoint and OneDrive (readonly) - for knowledge base
Sites.Read.All- Read all SharePoint sites and document librariesFiles.Read.All- Read files in all site collections
-
Offline access for refresh tokens
offline_access- Refresh token capability
-
Core identity and directory (readonly)
- You will arrive at a “Permissions requested” screen.
- Check the box for Consent on behalf of your organization.
- Click Accept
- That’s it! Microsoft will redirect you back to the Serval integration you just created.
Custom application
- In Serval, navigate to Apps → Available → Microsoft Graph
- Click Connect to bring up the “Connect” dialog.
- Click “Custom application” to open the “Configure Microsoft Graph” dialog**.
- Start the Azure steps below, and fill in the following information as you go:
- Instance Name: Descriptive name for this integration
- Tenant ID: Your Azure AD tenant ID (from Azure step 1)
- Client ID: Your application client ID (from Azure step 1)
- Client Secret: The secret value (from Azure step 2)
- Once all fields are filled, click Connect to establish the integration
- You should land on the application configuration page for your new Microsoft Graph integration. Click on the “API integration” tab
- Click Run on the health checks to confirm permissions are set up properly.
Microsoft Entra ID / Azure AD Configuration
The following steps will require access to the Azure Portal with sufficient administrator permissions to perform these tasks.1. Create Entra App Registration
- In a separate tab or window, go to the Azure Portal and sign in with admin privileges
- In the app selector, navigate to Microsoft Entra with this link
- Navigate to App registrations in the left sidebar
- Click New registration
- Configure the application:
- Name: “Serval Microsoft Graph Integration” (or similar)
- Supported account types: “Accounts in this organizational directory only”
- Redirect URI: Leave blank
- Click Register
- Copy these values from the Overview page into the Serval “Connect” dialog:
- Application (client) ID - This is your
Client ID - Directory (tenant) ID - This is your
Tenant ID
- Application (client) ID - This is your
2. Create Client Secret
- Navigate to Certificates & secrets → New client secret
- Add description: “Serval Integration Secret”
- Choose expiration period and click Add
- ⚠️ Important: Copy the secret Value immediately - this is your
Client Secret - Paste the secret into the Serval “Connect” dialog.
- At this point, the Serval “Connect” dialog should be complete.
3. Configure API Permissions
- Navigate to API permissions → Add a permission → Microsoft Graph → Application permissions
-
Add required scopes based on your needs. Common permissions include:
Applications & App Catalog:
Application.Read.All- Read applicationsApplication.ReadWrite.All- Read and write applicationsApplication.ReadWrite.OwnedBy- Read and write applications owned by the current userAppCatalog.Read.All- Read app catalogAppCatalog.ReadWrite.All- Read and write app catalog
Directory.Read.All- Read directory dataUser.Read.All- Read user profilesUser.ReadWrite.All- Read and write user profilesGroup.Read.All- Read groupsGroup.ReadWrite.All- Read and write groups
Mail.Read- Read mail in all mailboxesCalendars.Read- Read calendarsContacts.Read- Read contacts
Files.Read.All- Read files in all sitesSites.Read.All- Read SharePoint items
Team.ReadBasic.All- Read team names/descriptionsTeamMember.Read.All- Read team members
DeviceManagementManagedDevices.Read.All- Read managed devices
Reports.Read.All- Read usage reportsSecurityEvents.Read.All- Read security events
.ReadWrite.Allpermissions. For Microsoft Teams, the following permissions are required:ChannelMessage.Read.All- Allows the app to read all channel messages in Microsoft TeamsDirectory.Read.All- Allows the app to read data in your organization’s directory, such as users, groups and apps.Group.Read.AllTeam.ReadBasic.All- Get a list of all teams.Teamwork.Migrate.AllUser.Read.All- Allows the app to read user profiles without a signed in user.
- Grant admin consent: Click Grant admin consent for [Your Organization] → Yes.
- Verify all permissions show Granted for [Your Organization]
https://graph.microsoft.com/.default scope, which grants access to all application permissions configured above. For detailed permission information, see the Microsoft Graph permissions reference.

