> For the complete documentation index, see [llms.txt](https://engyon.gitbook.io/engyon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://engyon.gitbook.io/engyon/en/admin/organisation/setting-up-single-sign-on.md).

# Setting up Single Sign-On (SSO)

Setting up single sign-on via Options → Organisation, with login domains and an identity provider.

By default, users log in to Engyon using an email address and a password (and a one-time password because MFA is enforced in this case). However, it is possible to allow users to log in using *single sign-on* (SSO). In that case, users log in to an identity provider (IdP) and gain access to Engyon this way.

You need the <kbd>Admin</kbd> role at the audit firm. See [Organisation](/engyon/en/admin/organisation.md).

To configure SSO, it is necessary to navigate to <kbd>Options</kbd> within Engyon. Within the options, there is an <kbd>Organisation</kbd> screen. The left column holds the organisation settings.

## Login domains

Before SSO can be configured, the domains of the organisation must first be defined (in many cases, this is a single domain). These are the email domains used by users of the organisation to log in. For example, if the organisation's users log in with `firstname.lastname@engyon.io`, then `engyon.io` must be entered as a domain.

1. Go to <kbd>Options</kbd> → <kbd>Organisation</kbd>.
2. In the left column, find the heading <kbd>login domains</kbd>.
3. Click the plus icon (<i class="fa-plus">:plus:</i>) to add a domain and click the checkmark icon (<i class="fa-check">:check:</i>) to save the domain.

The defined domains are used before logging in to determine which login options a user has.

{% hint style="info" %}
A domain can only be used for one organisation within Engyon.
{% endhint %}

## Adding an identity provider

Once the domains are defined, a single sign-on (or identity) provider can be added under the heading <kbd>single sign-on</kbd> by pressing the plus icon (<i class="fa-plus">:plus:</i>) next to the heading. This opens a screen where the desired protocol can be selected. Engyon supports **OpenID Connect** and **SAML 2.0** as protocols.

Click on the desired protocol. A screen opens where the configuration details can be entered. For OpenID Connect, fill in <kbd>Client ID</kbd> and <kbd>Client secret</kbd>. The application settings show the sign-in redirect URI, the sign-out redirect URI, and the initiate login URI for the identity provider. This configuration requires details from the identity provider, but also generates data that the identity provider needs. It is therefore recommended to configure the SSO provider within Engyon simultaneously with the application within the identity provider.

When defining the identity provider, the domains that apply to this specific identity provider can be selected (only domains defined for the organisation can be chosen). This way, Engyon supports multiple domains that may lead to different tenants at the IdP. A domain can be used for multiple identity providers (a user logging in with that domain will then get multiple options to log in). An identity provider can have multiple domains that point to that specific identity provider.

Click <kbd>Create</kbd> at the bottom to save the configuration. The configuration is now shown under the heading <kbd>single sign-on</kbd>. The details of the configuration can be viewed by clicking the information icon (<i class="fa-circle-info">:circle-info:</i>) next to the name of the configuration. Here, the configuration can also be deleted.

If a user now tries to log in with, for example, `firstname.lastname@engyon.io` as the email address, this person sees <kbd>Email & password</kbd> and the identity provider. The user selects one and logs in that way.

## Disabling password login

As soon as the functioning of SSO has been established, logging in via email address and password can be disabled. This can be done in the <kbd>Organisation</kbd> screen by switching off the toggle under <kbd>allow password login</kbd>.

If a user now tries to log in with, for example, `firstname.lastname@engyon.io` as the email address, this person will no longer see login options. The user is now automatically redirected to the identity provider to log in there.

{% hint style="info" %}
If a user logs in via SSO, MFA is not requested by the application and the user therefore does not need to enter a one-time password after logging in.
{% endhint %}

{% hint style="info" %}
Automatically creating users via SCIM is located under <kbd>remaining</kbd>, as soon as SSO exists. See [Inviting fellow auditors](/engyon/en/admin/organisation/inviting-auditors.md).
{% endhint %}
