创建 OAuth 连接
- Updated: 2025/07/07
Control Room 管理员可以为用户创建 OAuth 连接,以便在 packages 的身份验证操作中使用这些连接,而无需输入任何身份验证详细信息。
Salesforce 标志和徽标、Microsoft SharePoint 标志和徽标、Apigee 标志和徽标、ServiceNow 标志和徽标以及 Genesys 标志和徽标分别是 Salesforce, Inc.、Microsoft Corp.、Google LLC、ServiceNow, Inc. 和 Genesys 的商标或注册商标,仅用于识别目的。
先决条件
- 如果 Control Room 服务器位于代理之后并且外部连接必须通过代理,则请按照 配置转发代理设置 中所述配置转发代理设置。
- 确保您使用的用户角色已为 OAuth 连接功能启用了管理连接权限。 请参阅 角色的功能权限。
- 如果您要添加多个范围,请确保使用逗号分隔这些范围。
示例:api,refresh_token,offline_access
- 确保您已配置企业应用程序,并记下客户端 ID、客户端密钥、授权 URL、令牌 URL 和范围。 请参阅 配置企业应用程序
注:
- 请考虑上述先决条件以避免连接错误。
- 配置 OAuth 时,范围字段是可选的。 请咨询身份提供商 (IDP) 以确定所需的范围。
- 虽然下表列出了通过认证的应用程序,但您可以通过将提供程序类型选择为自定义,使用 来配置您的企业应用程序。
- 我们建议您使用配置了较长过期时间的刷新令牌。 请参阅 使用 AuthConfig App 启用 OAuth2 服务。
OAuth 的关键组件示例
企业应用程序 | 授权 URL | 令牌 URL | 范围 |
---|---|---|---|
Apigee | https://accounts.google.com/o/oauth2/auth?prompt=consent&access_type=offline | https://accounts.google.com/o/oauth2/token | https://www.googleapis.com/auth/cloud-platform |
Genesys | https://login.<yourinstance>.pure.cloud/oauth/authorize | https://login.<yourinstance>.pure.cloud/oauth/token | 不需要 |
Google Workspace(日历、云端硬盘、表格 和 Gmail) | https://accounts.google.com/o/oauth2/auth?prompt=consent&access_type=offline | https://oauth2.googleapis.com/token |
|
Jira | https://auth.atlassian.com/authorize | https://auth.atlassian.com/oauth/token | offline_access write:jira-work,read:jira-user,manage:jira-webhook,read:jira-work |
Microsoft Entra | https://login.microsoftonline.com/<tenant>/oauth2/v2.0/authorize | https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token | offline_access,openid,https://graph.microsoft.com/.default |
Microsoft 365 Outlook | https://login.microsoftonline.com/<tenant>/oauth2/v2.0/authorize | https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token | 授权码流程:offline_access, openid, https://graph.microsoft.com/.default |
Salesforce | https://<yourinstance>.salesforce.com/services/oauth2/authorize | https://<yourinstance>.salesforce.com/services/oauth2/token | api,refresh_token,offline_access |
ServiceNow | https://<yourinstance>.service-now.com/oauth_auth.do | https://<yourinstance>.service-now.com/oauth_token.do | 不需要 |
SharePoint | https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize | https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token | https://<domain-name>/AllSites.Manage,offline_access,openid 注: 仅当您的应用程序需要 ID 令牌中的 sub 声明来识别最终用户时,才需要 OpenID 范围。 否则,此范围是可选的。
|
过程
以下视频演示了如何创建 OAuth 连接: