Skip to content
  • There are no suggestions because the search field is empty.

Embed a Single Sign-On bot in SharePoint

Set up SharePoint and Okta so your people can sign in to an SSO-protected Josef bot embedded on your intranet.

You can embed a Josef bot that needs Single Sign-On (SSO) on a SharePoint page, so your people can use it without leaving your intranet.

An embedded bot needs a few settings from your IT team that a normal bot link doesn't. This article explains what to set up, who usually does it, and what your users will see.

Before you begin

  • SSO is set up for your organisation with Okta or Microsoft Entra ID (Azure AD). See Require Single Sign On to access your bots.
  • SSO is turned on for the bot. In the bot's Design tab, under End user access, turn on the toggle. Then click Update bot in the Launch tab.
  • You know which identity provider your organisation uses with Josef. The steps depend on it:
    • Okta: users can sign in inside the embedded bot. Follow steps 1–3 below.
    • Microsoft Entra ID: sign-in can't happen inside the embedded bot. See Using Microsoft Entra ID below.
  • You have help from:
    • a SharePoint admin, to allow Josef on your SharePoint pages, and
    • an Okta admin, to allow the Okta sign-in page to load inside SharePoint.

Step 1. Allow Josef bots on your SharePoint site (SharePoint admin)

By default SharePoint only lets you embed content from domains it trusts. Add the domain of your bot's live link.

  1. Find your bot's live link in the Josef Dashboard under [your bot] > Launch. Its domain depends on your region, for example:
    • au.bot.joseflegal.com (Australia)
    • us.bot.joseflegal.com (United States)
    • eu.bot.joseflegal.com (Europe)
    • uk.bot.joseflegal.com (United Kingdom)
  2. A site collection admin adds that domain under Site settings > HTML Field Security. Microsoft's guide: Allow or restrict the ability to embed content on SharePoint pages.

If you skip this step, SharePoint shows a message that embedding content from this website isn't allowed.

Step 2. Allow the Okta sign-in page to load in SharePoint (Okta admin)

Okta blocks its sign-in page from loading inside other websites unless you trust them. Add your SharePoint site as a trusted origin.

  1. In the Okta Admin Console, go to Security > API > Trusted Origins.
  2. Click Add Origin.
  3. Enter:
    • Origin name: e.g. SharePoint – Josef bots
    • Origin URL: your SharePoint address, e.g. https://yourcompany.sharepoint.com. Use https:// and no trailing slash or page path.
  4. Under Type, select iFrame embed.
  5. Click Save.

Okta's guide: Trusted Origins for iFrame embedding.

Note: If your Okta org uses the older Customizations > Other > iFrame embedding setting, Okta asks you to turn it off when you add a trusted origin. Check with your Okta admin first, because turning it off can affect other sites that embed Okta.

While you're in Okta, also check the Josef app:

  • Sign-in redirect URIs include https://auth.joseflegal.com/api/bot/okta.
  • Assignments: everyone who will use the bot is assigned to the Josef app, not just your Josef builders. For a bot your whole organisation uses, assign an all-staff group. If someone isn't assigned, Okta shows them an error instead of the bot.

Step 3. Embed the bot on your SharePoint page

  1. In the Josef Dashboard, go to [your bot] > Launch and copy the embed code. You can also use the code below. Replace LINK TO BOT with your bot's live link. This version also works well on mobile.
    <iframe src="LINK TO BOT" width="100%" height="800" frameborder="0" scrolling="yes" style="display:block;width:100%;max-width:100%;border:0;margin-bottom:110px;"></iframe>
  2. Edit your SharePoint page and add an Embed web part. Microsoft's guide: Add content to your page using the Embed web part.
  3. Paste the embed code and publish the page.
  4. Recommended: below the embed, add a link or button that opens the bot's live link in a new tab, e.g. "Having trouble? Open the bot in a new tab." Users on browsers that limit embedded sign-in can use this instead (see Browser support below).

What your users will see

  1. The bot shows a Log in with Single Sign On screen.
  2. The user clicks Sign in with Okta. They don't need to type their email.
  3. One of two things happens:
    • Already signed in to Okta (most users on a work device): Okta sends them straight back to the bot. They won't see a password prompt.
    • Not signed in: the Okta sign-in page opens inside the embed. After signing in, they go back to the bot.

Users stay signed in while the browser tab is open, including if they refresh the page. If they open the page in a new tab or window, they click Sign in with Okta again. If they're still signed in to Okta, this takes one click.

Using Microsoft Entra ID

Microsoft doesn't allow its sign-in page to load inside another website. It's a Microsoft security protection, and your IT team can't turn it off. So a bot that requires Microsoft SSO can't sign users in while it's embedded on a SharePoint page.

Choose one of these options:

  1. Link to the bot instead of embedding it (recommended). Add a button or link on your SharePoint page that opens the bot's live link in a new tab. Users are usually already signed in to Microsoft from SharePoint, so they'll go straight through after picking their account.
  2. Embed the bot without SSO, and control access with SharePoint. Turn off End user access SSO for the bot. Then restrict who can see the SharePoint page with SharePoint permissions.
  3. Restrict the bot to your company network. Josef can limit a bot to your organisation's IP addresses, so only people on your network or VPN can open it. Contact your Customer Success Manager to set this up.

Troubleshooting

What you see Likely cause Fix
SharePoint says embedding content from this website isn't allowed The bot's domain isn't on the SharePoint allowlist Step 1
A blank box, or "refused to connect", after clicking Sign in with Okta SharePoint isn't a trusted origin in Okta Step 2
A blank box, or "refused to connect", after clicking Sign in with Microsoft Microsoft sign-in can't load inside an embed See Using Microsoft Entra ID
Okta says the user isn't assigned to the app The user isn't assigned to the Josef app in Okta Assign them, or an all-staff group, in Okta
The Okta sign-in keeps coming back, or the user is asked for credentials every time The browser blocks third-party cookies (Safari, Firefox, Private windows) Use Chrome or Edge, or the Open in a new tab link

Got a question? Contact us at support@joseflegal.com.