---
title: "API: Single Sign On (SSO)"
description: The following article will cover how to use the API when SSO is enabled for your site.
---

[Skip to content](https://guide.contentcatalyst.com/api-single-sign-on-sso#main-content)

![CC logo blue-1 (1)](https://guide.contentcatalyst.com/hs-fs/hubfs/CC%20logo%20blue-1%20(1).png?width=200&height=89&name=CC%20logo%20blue-1%20(1).png)

- [Guide & Help](https://guide.contentcatalyst.com/)
- [Main Website](https://contentcatalyst.com/)
- [Go to Customer Portal](https://guide.contentcatalyst.com/tickets-view)

Open main navigation

Close main navigation

- [Guide & Help](https://guide.contentcatalyst.com/)
- [Main Website](https://contentcatalyst.com/)
- [Go to Customer Portal](https://guide.contentcatalyst.com/tickets-view)
- [Main Website](https://contentcatalyst.com/)

[Main Website](https://contentcatalyst.com/)

 Learn all about the platform

- There are no suggestions because the search field is empty.

1. [Guide & Help](https://guide.contentcatalyst.com/?hsLang=en)
2. [Operations & Administration support](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en)
3. [API](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#api)

# API: Single Sign On (SSO)

##  The following article will cover how to use the API when SSO is enabled for your site. 

If you have an existing ecosystem of sites available to your subscribers, you can setup Content Catalyst to participate in existing user login sessions so your users can instantly access Content Catalyst without logging in.

To set it up, please contact support. We will need the following information from you (explained in more detail below):

- The URL of a hosted website or login hub to direct traffic to.
- If you have an open site, we can optionally direct users attempting to register to a different URL where they can be presented with a Register form instead of Login.
- We optionally provide a “Return URL” to indicate the page the user was attempting to access before they were forwarded to the authentication hub. To use it, we need the name of the query parameter to provide it (we recommend `returnUrl`).

We will provide you with a shared, secret key which can be used to generate a temporary session key.

**🚨Note:** It is important to keep this key secure because it can be used to login as anyone on the system, including administrators.

### How a user would Sign in

![](https://guide.contentcatalyst.com/hs-fs/hubfs/SingleSignOnUpdate%2026-png.png?width=670&height=553&name=SingleSignOnUpdate%2026-png.png)

When SSO is enabled, any unauthenticated users (or bots) accessing the site will be redirected to your authentication hub.

The authentication hub is responsible for confirming who the user is. This could be by detecting an established login session (e.g. a cookie) or asking the user to login/register.

You could also present a security screen at this stage to ensure the user is trying to access Content Catalyst.

If the user was recognised, or after they have logged in, the authentication hub should use the following call `GET` **~/api/v1/authenticate/singlesignon** to generate a temporary session key.

 

(An example of using the API is below, or follow the link to get more information on this endpoint).

 

The user should then be redirected back to Content Catalyst (using the URL defined below), by automatically redirecting the user's browser or asking the user to click a link.

###  Generating the redirect URL<https://demo.contentcatalyst.com/_static/documentation/Integrations/use-cases/SingleSignOn.html#generating-the-redirect-url>

Once you’ve obtained a session key, you need to generate a URL in the style of `https://{Host}/ir/irLogin.aspx?un={UserName}&SessionKey={SessionKey}`.

If the user was redirected from iReports, we will include which page the user was trying to access. For the best user experience, you should include this value in the optional `ReturnUrl` query parameter.

This will allow the user to continue from where they were trying to access seamlessly. .

| Parameter | Value |
| --- | --- |
| Host | The base URL of this site |
| UserName | The name of the user to be logged in |
| SessionKey | The session key obtained from the API |
| ReturnUrl | Optional: A relative URL to a page in iReports |

🚨**Note  :** You should URL encode the username, session key and return URL parameters. 

See examples below.

- [Bash](https://guide.contentcatalyst.com/api-single-sign-on-sso#Bash)
- [C#](https://guide.contentcatalyst.com/api-single-sign-on-sso#CSharp)

### Bash

```
#!/bin/bash baseUrl=$1 username=$2 secretKey=$3 returnUrl=$4  # Get the sessionKey and pipe through jq to deserialize the JSON (and select the current node which is a string) sessionKey=$(curl -s -d username=$username -d authkey=$secretKey -H "accept: application/json" -G "${baseUrl}api/v1/authenticate/singlesignon" | jq -r '.')  echo "https://example.com/ir/irLogin.aspx?un=$username&SessionKey=$sessionKey&returnUrl=$returnUrl" 
```

### C#

```
using System; using IO.Swagger.v1.Api; using IO.Swagger.v1.Client; using Newtonsoft.Json;  public string GetRedirectUrl(string username, string secretKey, string returnUrl) {     var authClient = new AuthenticationApi(_v1Configuration);      // Normally responses are automatically deserialzed, but this client doesn't deserialize plain strings correctly, so pass through JSON.NET for correct handling.     var sessionKey = JsonConvert.DeserializeObject<string>(authClient.AuthenticateSinglesignonGet(username, secretKey));     if (string.IsNullOrEmpty(sessionKey))     {         throw new InvalidOperationException("Invalid secret key or username");     }      return string.Format(         "http://example.com/ir/irlogin.aspx?un={0}&SessionKey={1}&returnUrl={2}",Uri.EscapeDataString(username), Uri.EscapeDataString(sessionKey), Uri.EscapeDataString(returnUrl)); } 
```

### User impersonation<https://demo.contentcatalyst.com/_static/documentation/Integrations/use-cases/SingleSignOn.html#user-impersonation>

If you have support staff who need to temporarily impersonate a user, you can use SSO from your CRM to begin an impersonated session.

When requesting a session key, you can specify the optional ‘impersonateUsername’ parameter. You can then generate a session key as normal (The `Username` in the URL should be your support staff username).

To use this feature, your staff member must either have the ‘Client’ admin right, or their preference ‘Can impersonate other users’ must be true.

- [Setting Up Your Content Catalyst Subscriber Portal](https://guide.contentcatalyst.com/setting-up-your-content-catalyst-subscriber-portal?hsLang=en#main-content)
  
  
  
  
  
    - [Onboarding](https://guide.contentcatalyst.com/setting-up-your-content-catalyst-subscriber-portal?hsLang=en#onboarding)
    - [Site Options](https://guide.contentcatalyst.com/setting-up-your-content-catalyst-subscriber-portal?hsLang=en#site-options)
    - [Showcase Page](https://guide.contentcatalyst.com/setting-up-your-content-catalyst-subscriber-portal?hsLang=en#showcase-page)
    - [Export Template Customisation & Branding](https://guide.contentcatalyst.com/setting-up-your-content-catalyst-subscriber-portal?hsLang=en#export-template-customisation-branding)
    - [Site Design & Branding](https://guide.contentcatalyst.com/setting-up-your-content-catalyst-subscriber-portal?hsLang=en#site-design-branding)
- [Site Authentication & User Registration](https://guide.contentcatalyst.com/site-authentication-user-registration?hsLang=en#main-content)
  
  
  
  
  
    - [Site Access](https://guide.contentcatalyst.com/site-authentication-user-registration?hsLang=en#site-access)
    - [User Registration](https://guide.contentcatalyst.com/site-authentication-user-registration?hsLang=en#user-registration)
    - [SSO](https://guide.contentcatalyst.com/site-authentication-user-registration?hsLang=en#sso)
- [Account & User Management](https://guide.contentcatalyst.com/account-user-management?hsLang=en#main-content)
  
  
  
  
  
    - [Account Creation & Management](https://guide.contentcatalyst.com/account-user-management?hsLang=en#account-creation-management)
    - [User Creation & Management](https://guide.contentcatalyst.com/account-user-management?hsLang=en#user-creation-management)
    - [Security](https://guide.contentcatalyst.com/account-user-management?hsLang=en#security)
    - [Account Manager Creation & Management](https://guide.contentcatalyst.com/account-user-management?hsLang=en#account-manager-creation-management)
    - [Guest Access](https://guide.contentcatalyst.com/account-user-management?hsLang=en#guest-access)
- [Licensing & Access Management](https://guide.contentcatalyst.com/licensing-access-management?hsLang=en#main-content)
  
  
  
  
  
    - [Creating & Managing Licenses](https://guide.contentcatalyst.com/licensing-access-management?hsLang=en#creating-managing-licenses)
    - [Prevent Full Downloads](https://guide.contentcatalyst.com/licensing-access-management?hsLang=en#prevent-full-downloads)
    - [Remote Access](https://guide.contentcatalyst.com/licensing-access-management?hsLang=en#remote-access)
    - [Restrict Export Formats](https://guide.contentcatalyst.com/licensing-access-management?hsLang=en#restrict-export-formats)
- [Organise, Categorise, and Link Content](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#main-content)
  
  
  
  
  
    - [Creating & Managing Category Trees](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#creating-managing-category-trees)
    - [Configuring Category Landing Pages](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#configuring-category-landing-pages)
    - [Category & Report Covers](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#category-report-covers)
    - [Chapters & Sections](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#chapters-sections)
    - [Analysts](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#analysts)
    - [Tags](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#tags)
    - [Report Series & Linked Reports](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#report-series-linked-reports)
    - [Promote Categories](https://guide.contentcatalyst.com/organise-categorise-and-link-content?hsLang=en#promote-categories)
- [Create & Deliver Content and Data](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#main-content)
  
  
  
  
  
    - [Report Metadata](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#report-metadata)
    - [Importing Content](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#importing-content)
    - [Instant Insights/Briefings](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#instant-insights-briefings)
    - [Interactive Docs](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#interactive-docs)
    - [DocuViewer](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#docuviewer)
    - [PDF/SlideViewer](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#pdf-slideviewer)
    - [Power BI](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#power-bi)
    - [Video Content](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#video-content)
    - [External Reports](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#external-reports)
    - [Publishing Workflow](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#publishing-workflow)
    - [DataViewer](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#dataviewer)
    - [RSS Feeds](https://guide.contentcatalyst.com/create-deliver-content-and-data?hsLang=en#rss-feeds)
- [Operations & Administration support](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#main-content)
  
  
  
  
  
    - [Domain Configuration](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#domain-configuration)
    - [Email Deliverability](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#email-deliverability)
    - [Search Configuration](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#search-configuration)
    - [Chargeback Codes](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#chargeback-codes)
    - [Policies & Notices](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#policies-notices)
    - [API](https://guide.contentcatalyst.com/operations-administration-support?hsLang=en#api)
- [Site Extensions & Integrations](https://guide.contentcatalyst.com/site-extensions-integrations?hsLang=en#main-content)
  
  
  
  
  
    - [CRM Integrations](https://guide.contentcatalyst.com/site-extensions-integrations?hsLang=en#crm-integrations)
    - [Integrations](https://guide.contentcatalyst.com/site-extensions-integrations?hsLang=en#integrations)
- [Tracking & Analytics of Subscriber Use](https://guide.contentcatalyst.com/tracking-analytics-of-subscriber-use?hsLang=en#main-content)
  
  
  
  
  
    - [General](https://guide.contentcatalyst.com/tracking-analytics-of-subscriber-use?hsLang=en#general)
    - [Report Access](https://guide.contentcatalyst.com/tracking-analytics-of-subscriber-use?hsLang=en#report-access)
    - [Popular Searches](https://guide.contentcatalyst.com/tracking-analytics-of-subscriber-use?hsLang=en#popular-searches)
    - [Tracking Snippets](https://guide.contentcatalyst.com/tracking-analytics-of-subscriber-use?hsLang=en#tracking-snippets)
    - [Account Statistics](https://guide.contentcatalyst.com/tracking-analytics-of-subscriber-use?hsLang=en#account-statistics)
    - [Analytics Sales Leads](https://guide.contentcatalyst.com/tracking-analytics-of-subscriber-use?hsLang=en#analytics-sales-leads)
- [Sales & Marketing](https://guide.contentcatalyst.com/sales-marketing?hsLang=en#main-content)
  
  
  
  
  
    - [Email Customisation & Branding](https://guide.contentcatalyst.com/sales-marketing?hsLang=en#email-customisation-branding)
    - [Buy It Now](https://guide.contentcatalyst.com/sales-marketing?hsLang=en#buy-it-now)
    - [Instant Access Links](https://guide.contentcatalyst.com/sales-marketing?hsLang=en#instant-access-links)
    - [Search Engine Verification](https://guide.contentcatalyst.com/sales-marketing?hsLang=en#search-engine-verification)
    - [Trials](https://guide.contentcatalyst.com/sales-marketing?hsLang=en#trials)
    - [Personalised Content Notifications](https://guide.contentcatalyst.com/sales-marketing?hsLang=en#personalised-content-notifications)
- [Content Discovery](https://guide.contentcatalyst.com/content-discovery?hsLang=en#main-content)
  
  
  
  
  
    - [Site Navigation](https://guide.contentcatalyst.com/content-discovery?hsLang=en#site-navigation)
    - [End-User Search](https://guide.contentcatalyst.com/content-discovery?hsLang=en#end-user-search)
    - [Categories & Tags](https://guide.contentcatalyst.com/content-discovery?hsLang=en#categories-tags)
    - [MyCatalyst](https://guide.contentcatalyst.com/content-discovery?hsLang=en#mycatalyst)
- [End-User Actions](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#main-content)
  
  
  
  
  
    - [Share Briefing](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#share-briefing)
    - [Ask The Analyst](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#ask-the-analyst)
    - [Collate & Export Content](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#collate-export-content)
    - [Share](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#share)
    - [Notes](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#notes)
    - [Translation](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#translation)
    - [User Profile](https://guide.contentcatalyst.com/end-user-actions?hsLang=en#user-profile)
- [RabbitMQ](https://guide.contentcatalyst.com/rabbitmq?hsLang=en#main-content)
  
  
  
  
  
    - [How to Use Rabbit MQ](https://guide.contentcatalyst.com/rabbitmq?hsLang=en#how-to-use-rabbit-mq)
    - [RabbitMQ: Events](https://guide.contentcatalyst.com/rabbitmq?hsLang=en#rabbitmq-events)

- [Main Website](https://contentcatalyst.com/)
- [Go to Customer Portal](https://guide.contentcatalyst.com/tickets-view)
- [Release Notes](https://guide.contentcatalyst.com/release-notes)
- [Raise a Ticket](https://guide.contentcatalyst.com/tickets-view/new?)

[![CC logo blue-1 (1)](https://guide.contentcatalyst.com/hs-fs/hubfs/CC%20logo%20blue-1%20(1).png?width=100&height=44&name=CC%20logo%20blue-1%20(1).png "CC logo blue-1 (1)")](http://contentcatalyst.com)

Energise your insights

<https://www.linkedin.com/company/content-catalyst>

Copyright © 2025, Content Catalyst Ltd.