Set Up Salesforce IT Service in Microsoft Teams with an LWR Template

Connect your Lightning Web Runtime (LWR) site to the Lightning Out 2.0 app. Configure site access and security, and publish the site to give employees access to Salesforce IT Service in Microsoft Teams.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, and Unlimited Editions with Agentforce IT Service.
User Permissions Needed
To configure Microsoft Teams and the Lightning Out 2.0 app: Salesforce administrator
  1. Turn on the Microsoft Teams to provision the Lightning Out 2.0 app.
    1. From Setup, in the Quick Find box, enter Salesforce Go, and then select Salesforce Go.
    2. Find and select Microsoft Teams for Employees and Fulfillers.
    3. Turn on Microsoft Teams for Employees and Fulfillers.
      Turning on this feature deploys the default tabs (Tickets, Approvals, Service Catalog, My Assets, and Employee Enablement) and creates the Lightning Out 2.0 app in the background.
    4. Turn on Employee Service to help employees create and manage tickets from Microsoft Teams.
  2. Create an Experience Cloud site by using the Lightning Out (LWR) template.
    1. From Setup, in the Quick Find box, enter Digital Experiences, and then select All Sites.
    2. Click New.
    3. Select the Lightning Out (LWR) template.
      Use the Lightning Out (LWR) template to render Salesforce IT Service lightning web components directly in an LWR site.
    4. On the Lightning Out (LWR) template page, click Get Started.
    5. Enter a name and a URL suffix for the site, and then click Create.
      Use the URL suffix lwrPortal.
  3. Add the employees who need access as members of the site.
    1. Select Administration for the site.
    2. Select Members, and add the profiles or permission sets for users who access the site.
    3. Save your changes.
  4. Allow employees to log in directly to the site.
    1. In the Administration settings, select Login & Registration.
    2. Select Allow employees to log in directly to an Experience Cloud site.
    3. Save your changes.
  5. Configure security and privacy settings for an LWR site in Microsoft Teams.
    1. Open your LWR site in Experience Builder.
    2. Go to Settings > General and confirm that the site uses the Lightning Out (LWR) template.
    3. Select Security & Privacy.
    4. For Clickjack Protection Level, select Allow framing of site pages on external domains (Good protection).
    5. Under Trusted Domains for Inline Framing, click Add Trusted Domain.
    6. Enter a Microsoft Teams origin URL that users access the site from, such as https://teams.cloud.microsoft, https://teams.microsoft.com, or your production URL, and click Add Trusted Domain.
      URLs must begin with https:// or wss://, and spaces must be encoded as %20.
    7. Repeat steps e and f for all Microsoft Teams origin URLs that users access.
    8. Under Content Security Policy (CSP), set Security Level to Strict CSP: Block Access to Inline Scripts and Permit Access to Allowed Hosts (Recommended).
    9. Confirm that Lightning Web Security remains enabled to isolate components in different namespaces.
    10. Under Trusted Sites for Scripts, add any third-party script hosts.
    11. From Setup, in the Quick Find box, enter Trusted URLs, and then select Trusted URLs.
    12. Add hosts for other external resources, such as images, videos, and stylesheets.
    13. Review CSP Errors for resources blocked within the past 30 days and resolve any conflicts until the section indicates that the site is issue-free.
  6. Confirm that the Salesforce IT Service components are added to the Lightning Out 2.0 app.
    1. From Setup, in the Quick Find box, enter Lightning Out, and then select Lightning Out 2.0 App Manager.
    2. For the TEAMS_LO2_LWR_APP app, click the dropdown arrow, and then select Edit App.
    3. On the App Components tab, confirm that the Lightning web components for the IT Service experience (Service Catalog, My Assets, Employee Enablement, and Tickets) are listed.
    4. To add a component, enter its name in the Add Component field, and then click Add Component.
  7. Link the LWR site to the Lightning Out 2.0 app.
    1. On the Edit Lightning Out 2.0 App page, select Linked Communities Site tab.
    2. Select the Lightning Out (LWR) site that you created.
    3. Save your changes.
  8. Publish the site.
    1. Go to Experience Builder for your LWR site.
    2. Click Publish.
    3. Wait for the confirmation email indicating the site is published.