> 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/login-code.md).

# 第一步：設定組織代碼

組織代碼是成員在登入頁輸入的識別碼，系統靠它判斷要跳轉到哪個團隊的企業身份源。

## 操作

{% stepper %}
{% step %}

## 前往企業登入設定

前往 **安全 → 企業登入**。

<figure><img src="https://1973974622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBZneYuSUsErYNDcsI8Fx%2Fuploads%2FWbzEkiPF8hq7tzXhbNQB%2Fimage.png?alt=media&amp;token=73401b81-f335-4f6a-9670-e92c442d7356" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## 找到組織代碼欄位

在「企業登入（SSO）」區塊找到 **組織代碼** 欄位。

<figure><img src="https://1973974622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBZneYuSUsErYNDcsI8Fx%2Fuploads%2FXNGBftY2LlDDeMiJF1GN%2Fimage.png?alt=media&amp;token=01be40e4-280c-4e67-9ec6-1468dfceb9f4" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## 輸入並確認代碼

輸入代碼後，游標離開欄位時系統會自動檢查是否可用，可用會顯示「可以使用」。

<figure><img src="https://1973974622-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBZneYuSUsErYNDcsI8Fx%2Fuploads%2FK8FMAFbuIB1868CDyVK6%2Fimage.png?alt=media&amp;token=e7711eb0-9b69-40cb-8ce1-def7869ec09f" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

## 儲存

點 **儲存**。
{% endstep %}
{% endstepper %}

## 命名規則

| 項目    | 規則                             |
| ----- | ------------------------------ |
| 長度    | 2–64 位                         |
| 可用字元  | 英文字母、數字，以及 `.` `-` `_` `@` `+` |
| 開頭與結尾 | 必須是字母或數字                       |
| 唯一性   | 全平台唯一，已被其他團隊使用時會提示「該組織代碼已被使用」  |

* 初始值是團隊代碼，可以改成成員好記的值（例如公司英文簡稱）。
* 大小寫不影響判斷，成員輸入時不必區分大小寫。

## 修改組織代碼的影響

儲存修改時會出現確認提示：**儲存後，成員之前記住的組織代碼將失效**。

意思是成員下次登入必須輸入新的代碼，瀏覽器記住的舊值不再有效。已建立的綁定關係不受影響，不需要重新綁定。

{% hint style="info" %}
建議在正式推廣給成員之前就定好組織代碼，之後盡量不要再改。
{% endhint %}

## 配對規則說明（提前了解）

組織代碼欄位下方的說明對應的是登入時的比對邏輯：

> 首次登入時，企業身份源回傳的值需與成員的電郵或手機號碼配對，配對失敗將無法登入；預設使用員工資料，單獨設定的值優先。

* **預設**：用成員員工資料裡的電郵／手機號碼比對。
* **可覆蓋**：若某位成員在企業身份源裡用的是另一組電郵或手機，可在 **通訊錄 → 成員** 的成員詳情中單獨設定，詳見 [第四步](/coreway-hr/zh-hk/sso/member-account.md)。

下一步 → [第二步：在企業身份源建立應用並登記地址](/coreway-hr/zh-hk/sso/register.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/login-code.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.
