Deploy IdP-access controlled agent to external website
This guide explains how to deploy a private CustomGPT.ai agent to an external website so that only users authenticated through your organization's Identity Provider (IdP) can access it.
Prerequisites
Before following this guide, make sure you have:
- A CustomGPT Teams (Enterprise) plan with SSO enabled. Contact the sales team if you're not sure whether this is active for your organization.
- SSO configured in your CustomGPT.ai account. See Control end-user access to agents via IdP if you haven't done this yet.
- Account Owner or Admin access in CustomGPT.ai.
Step 1: Set Up IdP End-User Access Control
If you haven't already configured end-user access via your IdP, complete the following steps first.
Create a Role in CustomGPT Teams
Before configuring the IdP connection, create the role that will be assigned to guest users.
- Click on My Profile.
- Click on Teams.
- Click on the Roles tab.
- Click Create Custom Role.
- Enter a Role Name. This must exactly match the attribute value your IdP will send — it is case-sensitive (for example, if your IdP sends
partner-support, the role name must bepartner-support).
- Enter a Description for the role.
- Deselect Role is Global — strongly recommended. Keeping the role local ensures access is strictly controlled and limited to the intended agents.
- In the Agents section, select which agents this role can access.
- Set Permission to Chat Only — strongly recommended. This prevents end-users from accessing any settings or configuration.
- Click Submit.
Enable IdP End-User Access in CustomGPT.ai
- Click My profile icon in the bottom-left corner
- Click My Profile from the dropdown
- Click the Single Sign On (SSO) tab
- Scroll to the IdP End-User Access Control section, and toggle On Enable End-User IdP Access
- Enter the attribute name you configured in your IdP (e.g.,
customgpt_role)
- Click Update Controls
Step 2: Enable the IdP Option on Your Agent
- Go to your agent's Personalize setting
- On the Personalize page, click on the Security tab
- Scroll to Agent Visibility, select Private
- In the Private Agent Deployment options, select Enabled (IdP).
- Click Save Settings
Once this is enabled, you'll see the following notice on your Deploy page:
"Private Agent Deployment is enabled. You can add the agent's code snippet to any website, but users will only be able to access it after signing in with your organization's account."
Step 3: Embed the Agent on Your Website
- Go to the Deploy page for your agent.
- Copy the embed code snippet.
- Paste it into the HTML of the page where you want the agent to appear.
No developer is required — this is a no-code process.
What Your Users Will Experience
When a user visits a page with the embedded agent, they will see a login prompt. Clicking it automatically redirects them to your organization's IdP login page. After successful authentication, they are returned directly to the chat.
Users do not need a CustomGPT.ai account. Sessions last 24 hours, after which they will be prompted to log in again.
Related Articles
Updated about 3 hours ago
