> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Microsoft Entra ID SSO 指南

> 使用 SAML 2.0 配置将 Dashboard 连接到 Microsoft Entra ID 以实现 SSO

本指南介绍如何使用 SAML 2.0 将 Yuno 连接到 Microsoft Entra ID（前身为 Azure Active Directory）。

## 前提条件

* 一个 Microsoft Entra ID 租户
* 一个用于 Yuno 的应用程序
* 用于管理 SSO 设置的 Entra ID 管理员权限
* 可以访问 [Yuno Dashboard](https://dashboard.y.uno/)

**1. 配置基本 SAML 设置**

首先，前往 Dashboard 并点击您的头像，然后打开 **Security**。导航到单点登录（SSO）选项卡，点击 **Set up** 并收集以下信息：

* Identifier (Entity ID)
* Assertion Consumer Service URL

![Yuno Dashboard 中的“Set up SSO in Yuno”面板，显示身份提供商设置为 Microsoft，以及需要复制到身份提供商中的 Identifier (Entity ID) 和 Assertion Consumer Service URL 字段](https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/microsoft-entra-id-sso-guide/image1.png?fit=max\&auto=format\&n=MTlogjS0_SlxtlJG\&q=85\&s=897c60eb2413502e3bc5312b527038ea)

在 Microsoft Entra ID 中，前往：

**Enterprise applications → All applications → Your application → Single sign-on**

在 **Basic SAML configuration** 下，输入 Yuno Dashboard 中的值。

![Microsoft Entra ID 企业应用程序的 Single sign-on 页面，突出显示 Basic SAML Configuration 部分中的 Identifier (Entity ID) 和 Reply URL (Assertion Consumer Service URL) 字段，下方是 Attributes & Claims 和 SAML Certificates 部分](https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/microsoft-entra-id-sso-guide/image2.png?fit=max\&auto=format\&n=MTlogjS0_SlxtlJG\&q=85\&s=466b5138e1abe7400fc49a51b0b0e567)

**2. 导出并上传联合元数据 XML**

在 Microsoft Entra ID 中，导航到 **SAML certificates** 部分并下载 **Federation Metadata XML** 文件。

![Microsoft Entra ID 的 SAML Certificates 部分，突出显示 Federation Metadata XML 下载链接，用于为 Yuno 导出元数据文件](https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/microsoft-entra-id-sso-guide/image3.png?fit=max\&auto=format\&n=MTlogjS0_SlxtlJG\&q=85\&s=b32a681a83bd56ac7b8737255a5336a5)

然后，在 Yuno Dashboard 中：

1. 在 **Yuno configuration → Option A: Upload metadata XML** 下上传 XML 文件
2. 等待 **Upload completed** 确认
3. 点击 **Save**

![Yuno Dashboard 中“Yuno configuration”第 3 步，显示 Option A 中已上传联合元数据 XML 文件并标记为“Upload completed”，以及 Cancel 和 Save 按钮](https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/microsoft-entra-id-sso-guide/image4.png?fit=max\&auto=format\&n=MTlogjS0_SlxtlJG\&q=85\&s=f2f90f6dfb9215df2f9e31658784e181)

或者，您也可以获取 **Option B** 中列出的信息并手动输入。

**3. 验证 SAML 证书设置**

在 Microsoft Entra ID 中，打开 **SAML certificates** 并确保：

* 签名选项为 **Sign SAML response and assertion**
* 签名算法为 **SHA-256**

点击 **Save** 应用更改。

## 故障排除

如果您无法设置 SSO 连接，或在初始配置后遇到问题：

* 请记住 Yuno 要求使用**已签名的 SAML 响应**，请检查：
  * SAML 响应和断言都已签名
  * 签名算法为 **SHA-256**
  * 签名证书与上传到 Yuno 的证书一致
* 在 Yuno Dashboard 的 **Security → Single sign-on (SSO)** 下查看 SSO 日志


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.