> For the complete documentation index, see [llms.txt](https://docs.coreway.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coreway.com/coreway-hr/zh-hk/sso/summary.md).

# 概述與前置條件

開啟企業登入後，團隊成員可以在登入頁輸入**組織代碼**，改用公司自己的企業身份源（IdP）登入，不需要再記一組獨立的帳號密碼。

本文以 **Okta** 為例說明完整設定流程。使用其他身份管理平台的團隊，請搭配對應附錄：\[Microsoft Entra ID]\(附錄：Microsoft Entra ID 設定範例.md)、\[Google Workspace]\(附錄：Google Workspace 設定範例.md)。Authing、OneLogin 等平台的步驟相同，差別只在對方後台的名稱與位置。

## 支援的協定

| 協定                       | 適用情境                                                                |
| ------------------------ | ------------------------------------------------------------------- |
| **OIDC**（OpenID Connect） | 身份平台提供 Discovery 地址（`.well-known/openid-configuration`），設定最簡單，優先選這個 |
| **SAML 2.0**             | 企業既有系統以 SAML 為主，或身份平台只提供 SAML 應用                                    |

一個團隊同一時間只能啟用一種協定。

## 運作流程

```
成員在登入頁輸入組織代碼
        ↓
系統依組織代碼找到團隊的企業身份源，跳轉過去
        ↓
成員在企業身份源完成登入（帳密／MFA 等由對方控制）
        ↓
企業身份源回傳身份資訊（NameID 或指定屬性）
        ↓
系統用回傳值比對成員的電郵或手機號碼
        ↓
配對成功 → 首次登入自動綁定，之後直接放行
配對失敗 → 無法登入
```

{% hint style="info" %}
**重點**：系統不會自動建立成員。成員必須已存在於團隊通訊錄，且企業身份源回傳的值能對上該成員的電郵或手機號碼，才能登入。
{% endhint %}

## 前置條件

* 你是團隊**管理員**，或具備「安全 → 企業登入」的操作權限。
* 你在企業身份源（如 Okta）具備建立應用的管理權限。
* 需要登入的成員已加入團隊通訊錄，且員工資料中的**電郵或手機號碼**與企業身份源中的值一致（不一致時可於第四步單獨設定）。

## 設定入口

登入系統後前往 **安全 → 企業登入**。

<figure><img src="https://1973974622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBZneYuSUsErYNDcsI8Fx%2Fuploads%2FYkKxZGt58tsyMpGih4jx%2Fimage.png?alt=media&amp;token=2e629b7a-7f47-4ddd-a131-ca4ba617b152" alt=""><figcaption></figcaption></figure>

頁面由三個區塊組成，對應後續步驟：

1. **企業登入（SSO）**：啟用開關 + 組織代碼 → [第一步](/coreway-hr/zh-hk/sso/login-code.md)
2. **企業身份源**：協定選擇、匯入與參數填寫 → [第三步](/coreway-hr/zh-hk/sso/register.md)
3. **登記到企業身份源**：需要填回對方後台的地址 → [第二步](/coreway-hr/zh-hk/sso/register.md)

## 建議的操作順序

{% stepper %}
{% step %}

## 設定並儲存組織代碼

在本系統完成設定。
{% endstep %}

{% step %}

## 複製登記地址、在 Okta 建立應用

從本系統複製登記地址，並在 Okta 建立應用。
{% endstep %}

{% step %}

## 匯入 Okta 的設定並儲存

將 Okta 的設定匯入本系統並儲存。
{% endstep %}

{% step %}

## 確認成員的企業帳號配對值

在本系統確認成員資料。
{% endstep %}

{% step %}

## 啟用並驗證登入

在本系統啟用並驗證登入。
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
組織代碼必須先儲存，否則儲存企業身份源時會提示「請先儲存組織代碼」。
{% endhint %}

設定過程中如遇問題，請見 [常見問題](/coreway-hr/zh-hk/sso/faq.md)。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coreway.com/coreway-hr/zh-hk/sso/summary.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
