Skip to content

OIDC

This topic describes how to configure single sign-on (SSO) based on the OIDC/OAuth 2.0 protocol in a Guance workspace. First, obtain application credentials from your enterprise identity provider (IdP), and add the identity provider in Guance. After saving, enter the callback URL generated by Guance back into the IdP application. If you use Lark, see Lark Single Sign-On Example (OIDC).

  • If the IdP provides a discovery endpoint and a standard user info endpoint, and the token endpoint supports client_secret_basic, use Standard OIDC Configuration.
  • If the IdP requires client_secret_post, requires manually specifying endpoints, or returns user info with a special structure, use Non-standard OIDC Configuration.

Prerequisites

Prepare the target workspace, configuration permissions for the IdP, and a test employee account with a corporate email address. In the IdP admin console, create or open an application for single sign-on, and set the grant type to authorization_code. If a response type option is available, select code.

Information to Obtain on the IdP Side Purpose
Client ID and Client Secret Enter the client credentials in Guance.
The discovery endpoint and the client authentication method for the token endpoint Used to select the configuration method. If the IdP has no discovery endpoint, prepare the authorization, token, and user info endpoint addresses.
The email and username fields in user info Enter the account mapping in Guance.
Corporate email address or email domain Used to configure access restrictions. You can start with the test employee's full email address.

If the IdP requires a callback URL before the application can be saved, you can use a temporary address allowed by the IdP first, and replace it after Guance generates the callback URL.

Standard OIDC Configuration

Step 1: Go to the Configuration Page

  1. In the target workspace, go to Management > Member Management > SSO Management > User SSO.
  2. Select OIDC.
  3. Click Add Identity Provider.

Step 2: Connection Configuration

  1. Identity Provider Name: Enter an easily identifiable name. The name appears on the identity provider selection page when employees log in, for example, Company Identity Center.
  2. Note: A user-defined description for recording information about the identity provider.
  3. Identity Provider URL: Enter the complete discovery endpoint provided by the IdP. The example is https://sso.example.com/realms/company/.well-known/openid-configuration. This address returns JSON containing fields such as authorization_endpoint and token_endpoint.
  4. Client ID: Enter the Client ID of the IdP application. The system uses it to identify the application.
  5. Client Secret: Enter the Client Secret of the same IdP application. The system uses it to verify the application's identity.
  6. Authorization Request Scope: The scope of the authorization request. The default includes openid, profile, and email. You can add address and phone claims as needed.

Step 3: Mapping Configuration

Mapping configuration determines which fields returned by the IdP Guance uses to read employee information. For example, when user info returns "email": "alice@example.com", enter the field name email in the Email field.

  1. Username: Required. Enter the username field name returned by the IdP, such as preferred_username.
  2. Email: Required. Enter the corporate email field name returned by the IdP, such as email.
  3. Phone Number: Optional. If you need to read the employee's phone number, enter the phone number field name returned by the IdP, such as phone_number.

Step 4: Login Control

  1. Access Restriction: Checks whether the domain suffix of the login email matches the configured domain. Only matching email addresses are allowed to access the SSO login link. For example, alice@example.com or example.com. Separate multiple values with commas. When an employee logs in for the first time, the system matches the IdP according to the access restriction and creates an SSO account for employees who meet the conditions.
  2. Role Authorization: Set the default role that employees receive when they first join the workspace. When role mapping is enabled, assign roles according to Role Mapping Rules.
  3. Session Persistence: Set the inactive session duration and the maximum login session duration.

Session Persistence

Setting Console Value Range Default Description
Inactive Login Session Persistence 30–1440 minutes 180 minutes The login session expires after this duration of continuous inactivity.
Maximum Login Session Persistence 1–7 days 7 days The login session expires after this duration from login.

These values apply to new SSO accounts. Existing SSO accounts continue to use their existing session duration configuration.

Role Authorization and Role Mapping

  • When role mapping is disabled, employees with existing roles continue to use their original roles, and employees without assigned roles get the default role set here.
  • When role mapping is enabled, employees receive all roles assigned by the matched rules. An employee must match at least one rule to enter the workspace through this IdP. See Role Mapping.

User-Side OIDC Configuration Notes

  • Grant Type: In the IdP application, use authorization_code, and select code as the response type.
  • ID Token Signature: Signing algorithm: Currently, only HS256 is supported.
  • Client Authentication When Exchanging for a Token:
    • Supported by Default: client_secret_basic.
    • Supported via Custom Method: Set getTokenSet.authMethod as required by the IdP. Available values include client_secret_post, client_secret_basic, and none.
  • Authorization Request Scope:
    • Default Scope: openid, profile, and email. If you need to obtain phone numbers and the IdP supports it, you can add phone.
    • Custom: When using OIDC, openid must be included. Ensure that the IdP returns the employee's corporate email address, and enter the actual returned field name in the Email mapping. Other scopes can be customized.

Step 5: Save and Get the Callback URL

Click Save, and view the following two URLs in the dialog box. You can also click Edit for the IdP in the OIDC list to view them again.

Field Description
Callback URL The address that the IdP returns to Guance after authorization is complete. Copy this address to configure Redirect URI in the IdP.
Login Initiation URL The single sign-on entry point for Guance. If the enterprise application needs to provide a login entry point, you can enter this address in the application home page or launch link.

Step 6: Configure the Callback URL in the IdP

  1. Return to the IdP application and paste the complete Callback URL copied in the previous step into Redirect URI or Login Callback URL.
  2. Confirm that the application uses the authorization_code grant type. If the IdP provides a response type option, select code. Save or publish the application.
  3. Confirm that the test account has permission to use the application, and confirm in Guance that this identity provider is enabled.

Non-standard OIDC Configuration

Step 1: Go to Non-standard Configuration

  1. In the target workspace, go to Management > Member Management > SSO Management > User SSO.
  2. Select OIDC, and click Add Identity Provider.
  3. Click Not a standard OIDC configuration? Click here in the upper right of the page.

Step 2: Fill In the Connection Configuration

  1. In Identity Provider Name, enter the name that employees see when logging in, for example, Company Identity Center. The name can contain up to 64 characters.
  2. In Configuration File Upload, download the template, fill it in according to the following table, and save it as a .json file. Click Upload and select the modified file.

    JSON Field Value
    clientId, clientSecret Enter the Client ID and Client Secret of the IdP application, respectively.
    scope Enter the authorization scopes supported by the IdP as a JSON array, and ensure that the employee's email address can be obtained after login.
    wellKnowURL If a discovery endpoint is available, enter the complete address. Leave blank when all endpoint addresses are specified manually.
    authSet.url, getTokenSet.url, getUserInfoSet.url Enter the IdP's authorization URL, token endpoint URL, and user info endpoint URL, respectively. If an address is not provided, the system reads the corresponding address from the discovery configuration returned by wellKnowURL.
    getTokenSet Set the request method, authMethod, and request parameters as required by the IdP. authMethod supports client_secret_basic, client_secret_post, and none. When using client_secret_post, see the Lark AnyCross Example.
    claimMapping Enter the IdP field name corresponding to the account field. For example, if the login email comes from the email field, set the value of claimMapping.email to email.
    getUserInfoSet.responseInfoPath Leave blank when user info is at the top level of the response. If user info is under data, enter data.
    getUserInfoSet.source, verifyTokenSet Default: origin, read from the user info endpoint. When reading via ID Token, set it to id_token; enter the JWKS address used for signature verification in verifyTokenSet.url, or provide a JWK list in verifyTokenSet.keys.
  3. Note is optional. You can record the purpose or owner of this identity provider.

Step 3: Set Login Control and Enter the Callback URL

  1. Fill in access restriction, role authorization, and session persistence according to Login Control.
  2. Save and copy the callback URL.
  3. Enter the callback URL in the IdP application, and confirm that the identity provider is enabled.

Login Verification

  1. Open the login page of the site in an incognito browser window, click Single Sign-On, and enter the test employee's full corporate email address.
  2. Click Get Login URL, select the identity provider you just configured, and complete login on the enterprise authentication page.
  3. After returning to Guance, go to the target workspace and verify the role obtained by the employee. If login fails, see FAQ.

Notes

  1. After Role Mapping is enabled, if an employee completes authentication but cannot enter the target workspace, check whether the attributes returned by the IdP match the mapping rules of that workspace. Role Authorization and Role Mapping
  2. After deleting an identity provider, employees can no longer use that IdP to enter the corresponding workspace.
  3. A workspace can be configured with up to 10 OIDC IdPs by default, counted separately from SAML. After employees complete enterprise authentication, they can enter authorized workspaces.
  4. Account identification is based on the corporate email address and the IdP. Regular accounts and SSO accounts are managed separately. When an employee meets the access conditions and does not yet have a corresponding SSO account, the system creates an SSO account.
  5. Email mapping should use the email field that the IdP actually returns and that has a value. If the field is not returned, the system prompts that the SSO email cannot be obtained. See Login Troubleshooting.

Related Documentation

FAQ · Role Mapping · SSO Management

Feedback

Is this page helpful?