Integrate Microsoft Teams with Salesforce
In this article
Yes, you can integrate Microsoft Teams with Salesforce to streamline communication and boost productivity by enabling real-time collaboration directly within Salesforce records. This integration allows users to launch Teams meetings, chat with colleagues, and view presence status without leaving Salesforce. Before beginning, ensure you have administrative access to both Microsoft Teams and Salesforce, and that both platforms are actively used and properly licensed in your organization.
What You'll Need
- Administrator access to your Salesforce org
- Administrator access to your Microsoft 365 tenant
- Active Microsoft Teams and Salesforce licenses
- Custom domain set up in Microsoft 365 (required for secure integration)
- Connected App in Salesforce (will be created during setup)
- Teams app permission policies configured to allow sideloading (if testing)
Step-by-Step
- Log in to your Salesforce org with administrator credentials. Navigate to Setup by clicking the gear icon in the top right and selecting Setup.
- In the Quick Find box, type My Domain and select it. If you haven’t already, register and deploy a custom domain. This is required for single sign-on and integration security. Follow the prompts to verify and deploy your domain.
- Still in Setup, search for Connected Apps and click New to create a new Connected App.
- Enter a Connected App Name (e.g., Microsoft Teams Integration), API Name, and Contact Email.
- Under API (Enable OAuth Settings), check the box to enable OAuth. Set the Callback URL to
https://teams.microsoft.com. - In the Selected OAuth Scopes section, add the following scopes: Access and manage your data (api) and Perform requests on your behalf at any time (refresh_token, offline_access). Click Add to move them to the selected list.
- Enable Require Secret for Web Server Flow and Enable for Device Flow if applicable. Save the Connected App.
- After saving, copy the Consumer Key and Consumer Secret — you’ll need these in Microsoft 365.
- Now, switch to the Microsoft 365 admin center. Sign in with your admin account and navigate to Teams admin center.
- Go to Teams apps > Manage apps and search for Salesforce. If available, install the official Salesforce app. If not, you may need to upload a custom app package (provided by Salesforce or a third-party integrator).
- In the Azure Active Directory portal, register a new application: Go to App registrations > New registration. Name it (e.g., Salesforce Integration), set the redirect URI to
https://login.salesforce.com/services/oauth2/callback, and register. - Under API permissions, add permissions for Microsoft Graph (e.g., Chat.ReadWrite, User.Read). Grant admin consent.
- Copy the Application (client) ID and Directory (tenant) ID from Azure. Return to Salesforce Setup.
- In Salesforce, go to Setup > Custom Settings or use a custom metadata type to store the Azure app credentials. Alternatively, use a secure custom setting or protected custom metadata to store the client ID and tenant ID.
- Install the Salesforce App for Microsoft Teams from AppSource if not already done. This adds the Salesforce tab to Teams channels and personal apps.
- Within Microsoft Teams, open a channel or chat and click + to add a tab. Search for Salesforce and add it. You can pin records, view cases, or launch meetings tied to Salesforce data.
- Test the integration by opening a Salesforce record (e.g., a Contact or Opportunity). Click the Teams icon (if enabled via Lightning component) to start a chat or meeting with team members associated with that record.
- Ensure users grant necessary permissions when prompted. Admins may need to pre-approve app permissions in both platforms to avoid user-level blocks.
Common Mistakes
- Skipping My Domain setup in Salesforce, which breaks SSO and integration security.
- Using incorrect callback URLs in OAuth settings, leading to authentication failures.
- Not granting admin consent for Azure app permissions, causing access errors.
- Forgetting to enable the Connected App for all required profiles in Salesforce.
- Installing unverified or third-party apps instead of the official Salesforce for Teams app.
Tips
- Test the integration in a sandbox environment before rolling out to production.
- Use Salesforce Lightning components to embed Teams presence or chat directly into record pages.
- Leverage the integration to launch Teams meetings from Salesforce events or tasks.
- Train users to use the Salesforce tab in Teams to track customer interactions collaboratively.
- Monitor login and API usage logs in both platforms to detect issues early.
Troubleshooting
If the integration fails, first verify that My Domain is active and properly deployed in Salesforce. Check that the Connected App is active and that OAuth scopes include necessary permissions. In Microsoft 365, confirm that the Azure app has the correct redirect URI and that admin consent has been granted. If users can’t see the Salesforce tab in Teams, ensure the app is approved and available in the Teams app catalog. Clear browser cache or try in an incognito window if authentication loops occur. Restart both Salesforce and Teams sessions. If issues persist, review the login history in Salesforce and sign-in logs in Azure AD for error details. Disable any conflicting security policies that block third-party integrations.
Frequently Asked Questions
Can I start a Teams meeting directly from a Salesforce record?
Yes, if the integration is set up correctly and the Teams presence component is added to the Lightning page layout, you can initiate a meeting or chat from a contact, lead, or opportunity record.
Do users need both Salesforce and Teams licenses?
Yes, each user must have valid licenses for both platforms to access the integrated features.
Is single sign-on supported?
Yes, but only if My Domain is configured in Salesforce and the organization uses federated authentication with Azure AD.
Can I sync Salesforce data into a Teams channel?
Yes, using the Salesforce tab in Teams, you can pin records, view updates, and receive notifications when data changes, depending on configuration.
Is this integration available on mobile devices?
Yes, the Salesforce app for Teams works on iOS and Android, but some features may be limited compared to desktop.
Does the integration support custom Salesforce objects?
Yes, but you may need to customize Lightning pages or use custom components to expose them in Teams.