在 Azure AD 中创建企业应用程序
1. 在 Azure AD 门户的 Azure Active Directory 菜单下,选择 Enterprise apllications 选项。
2. 在右侧打开的页面中,单击 New application
3. Browse Azure AD Gallery (Preview) 页面中,单击 Create your own application
4. 输入应用程序名称、选择 Integrate any other application you don’t find in the gallery 选项,然后单击 Create
5. Overview 页面上,单击 Set up a single sign on
6. Select a single sign-on method 屏幕上,选择 SAML 选项。随即将打开带有带编号步骤的 Set up Single Sign-On with SAML 页面。请完成下述详细步骤。
步骤 1 - 基本 SAML 配置 
1. 在步骤 1 Basic SAML Configuration 中,单击 Edit
2. Basic SAML Configuration 中,输入以下信息:
Indentifier (Entity ID) - 将用作 sso-settings.json 文件的 BasicSettings 组件内的 metadataEntityId 值。
Reply URL (Assertion Consumer Service URL) - 应使用以下格式:
https:/<ThingWorx FQDN>:<port>/Thingworx/saml/SSO
3. 单击 Save,然后关闭 Basic SAML Configuration。当系统提示您测试单一登录时,请选择 No, I’ll test later
随即将重新显示 Set up Single Sign-On with SAML 步骤,并输入 IdentifierReply URL 值。
步骤 2 - 用户属性和声明 
1. 在步骤 2 User Attributes & Claims 中单击 Edit
2. User Attributes & Claims 中单击 Add new claim
3. Manage claim 页面中,输入以下信息:
Name - 输入 UID。
Source - 选择 Tranformation 选项。随即将打开 Manage transformation 弹窗。
4. 如下图所示,在 Manage transformation 窗口中,输入以下信息:
TransformationStartWith()
Paramter 1 (Input)user.userprincipalname
ValueAdministrator@
Parameter 2 (Output)“Administrator”
Specify output if no match - 选中该复选框。
Parameter 3 (Output if no match)user.userprincipalname
5. 单击 Add
6. 单击 Save 并关闭 Manage Claim 窗口。当系统提示您测试单一登录时,请选择 No, I’ll test later
User Attributes & Claims 步骤将以刚输入的值重新显示。
步骤 3 - SAML 签名证书 
1. 在步骤 3 SAML Signing Certificate 中,下载 Azure AD 公共证书 Certificate (Raw)
2. 下载 Federation Metadata XML。下载完文件后,将其重命名为 sso-idp-metadata.xml
这对您有帮助吗?