Microsoft Entra ID Single Sign-On Example (SAML)¶
This article uses Microsoft Entra ID (formerly Azure AD) as the SAML identity provider. Prepare permissions to create enterprise applications in the target tenant, SSO management permissions for the target workspace, and a test user with a business email address configured. This example uses alice@example.com. Microsoft Entra configuration reference
Steps¶
1. Create an Application¶
1) Sign in to the Microsoft Entra admin center, go to Entra ID > Enterprise Applications > All Applications, and click New application.
2) On the New application page, click Create your own application. On the page that opens, enter the Name of the application, select Non-gallery application, and click Create to create a new application.
2. Configure SAML for the Application¶
Note: This step maps Microsoft Entra ID application attributes to the attributes of TrueWatch, establishing a trust relationship between Microsoft Entra ID and TrueWatch.
1) In the newly created application, click Single sign-on and select SAML.
2) In the Basic SAML Configuration section of the first step under Set up single sign-on, click Edit.
Enter temporary values and save them first so that you can download the federation metadata in the next step. Replace <auth-domain> with the authentication domain of your site, and then paste the actual values generated by the console in step 5.
| Microsoft Entra ID field | Temporary value |
|---|---|
| Identifier (Entity ID) | https://<auth-domain>/saml/metadata.xml |
| Reply URL (Assertion Consumer Service URL) | https://<auth-domain>/saml/assertion |
3) In the Attributes & Claims section, click Edit. Some consoles display this section as Attributes & Claims.
On the Attributes & Claims edit page, click Add new claim.
On the Manage claim page, fill in the following fields and save. This claim should return the test user's business email address.
| Claim setting | Value |
|---|---|
| Name | Email |
| Namespace | Leave blank so that the assertion attribute name is Email |
| Source | Attribute |
| Source attribute | user.mail. Confirm in the Entra user details that the test user's email is alice@example.com. If your organization uses user.userprincipalname to store the same business email address, you can use that field instead. |
3. Obtain the Microsoft Entra ID Metadata Document¶
Note: This step obtains the metadata document for creating an identity provider in TrueWatch.
- In the SAML Signing Certificate section, click Edit, confirm that Signing Option includes Sign SAML assertion, select SHA-256 for the signing algorithm, and save the settings. Microsoft Entra SAML signing options
- Return to SAML Signing Certificate, and click Download in the Federation Metadata XML row. This XML contains the IdP sign-in endpoint and signing certificate for upload in the next step.
4. Add a SAML Identity Provider in TrueWatch¶
- In the target workspace, go to Management > Member Management > SSO Management > User SSO, select SAML, and click Add Identity Provider.
- For Identity Provider, enter
Microsoft Entra ID; for Metadata Document, upload the federation metadata XML downloaded in step 3. - In Mapping Configuration, set both Email and Username to
Email, consistent with the claim name saved in step 2. Fill in Mobile Number as needed. - In Access Restrictions, enter
alice@example.com, select Role Authorization, confirm Session Persistence, and then save. For testing, you can select Read-only Member and use the default duration. - Click Edit for the identity provider, and copy the Entity ID and Assertion URL from the service provider details.
5. Replace the SAML Assertion URL in Microsoft Entra ID¶
Return to the Microsoft Entra application's Single sign-on > Basic SAML Configuration > Edit, and replace the temporary values from step 2 with the values copied in step 4. Verify the updated Identifier and Reply URL, and then click Save.
| Microsoft Entra ID field | Value |
|---|---|
| Identifier (Entity ID) | The Entity ID of TrueWatch |
| Reply URL (Assertion Consumer Service URL) | The Assertion URL of TrueWatch |
6. Configure Microsoft Entra ID Users¶
1) In Entra ID > Enterprise Applications, open the application created in this example, and click Users and groups > Add user/group.
2) Click None Selected, search by alice@example.com, select the test user, and click Select.
3) After selecting the user, return to Add assignment and click Add assignment.
4) After adding the user, you can view the list of users authorized for SSO sign-in in Users and groups.
Note: If no user exists, you can create a user under the Users menu.
7. Verify Sign-In¶
- In the SAML list in TrueWatch, confirm that
Microsoft Entra IDis enabled. - Open the TrueWatch sign-in page for your site in an incognito window, click Single Sign-On, and enter
alice@example.com. Click Get Login URL, selectMicrosoft Entra ID, and click Authenticate/Sign In. - Complete authentication on the Microsoft sign-in page using the assigned account. After returning to TrueWatch, go to the target workspace and verify the role. If Microsoft reports that the Reply URL does not match, recheck the Reply URL. If you are prompted that the email address was not found after returning, check whether the
Emailclaim source attribute has a value. Login troubleshooting














