Tutorial: Microsoft Entra single sign-on integration with Citrix ADC (header-based authentication)
In this tutorial, you'll learn how to integrate Citrix ADC with Microsoft Entra ID. When you integrate Citrix ADC with Microsoft Entra ID, you can:
- Control in Microsoft Entra ID who has access to Citrix ADC.
- Enable your users to be automatically signed-in to Citrix ADC with their Microsoft Entra accounts.
- Manage your accounts in one central location.
Prerequisites
To get started, you need the following items:
- A Microsoft Entra subscription. If you don't have a subscription, you can get a free account.
- Citrix ADC single sign-on (SSO) enabled subscription.
Scenario description
In this tutorial, you configure and test Microsoft Entra SSO in a test environment. The tutorial includes these scenarios:
SP-initiated SSO for Citrix ADC
Just in time user provisioning for Citrix ADC
Add Citrix ADC from the gallery
To integrate Citrix ADC with Microsoft Entra ID, first add Citrix ADC to your list of managed SaaS apps from the gallery:
Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
Browse to Identity > Applications > Enterprise applications > New application.
In the Add from the gallery section, enter Citrix ADC in the search box.
In the results, select Citrix ADC, and then add the app. Wait a few seconds while the app is added to your tenant.
Alternatively, you can also use the Enterprise App Configuration Wizard. In this wizard, you can add an application to your tenant, add users/groups to the app, assign roles, as well as walk through the SSO configuration as well. Learn more about Microsoft 365 wizards.
Configure and test Microsoft Entra SSO for Citrix ADC
Configure and test Microsoft Entra SSO with Citrix ADC by using a test user called B.Simon. For SSO to work, you need to establish a link relationship between a Microsoft Entra user and the related user in Citrix ADC.
To configure and test Microsoft Entra SSO with Citrix ADC, perform the following steps:
Configure Microsoft Entra SSO - to enable your users to use this feature.
Create a Microsoft Entra test user - to test Microsoft Entra SSO with B.Simon.
Assign the Microsoft Entra test user - to enable B.Simon to use Microsoft Entra SSO.
Configure Citrix ADC SSO - to configure the SSO settings on the application side.
- Create a Citrix ADC test user - to have a counterpart of B.Simon in Citrix ADC that is linked to the Microsoft Entra representation of the user.
Test SSO - to verify whether the configuration works.
Configure Microsoft Entra SSO
To enable Microsoft Entra SSO by using the Azure portal, complete these steps:
Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
Browse to Identity > Applications > Enterprise applications > Citrix ADC application integration pane, under Manage, select Single sign-on.
On the Select a single sign-on method pane, select SAML.
On the Set up Single Sign-On with SAML pane, select the pen Edit icon for Basic SAML Configuration to edit the settings.
In the Basic SAML Configuration section, to configure the application in IDP-initiated mode:
In the Identifier text box, enter a URL that has the following pattern:
https://<Your FQDN>
In the Reply URL text box, enter a URL that has the following pattern:
https://<Your FQDN>/CitrixAuthService/AuthService.asmx
To configure the application in SP-initiated mode, select Set additional URLs and complete the following step:
- In the Sign-on URL text box, enter a URL that has the following pattern:
https://<Your FQDN>/CitrixAuthService/AuthService.asmx
Note
- The URLs that are used in this section aren't real values. Update these values with the actual values for Identifier, Reply URL, and Sign-on URL. Contact the Citrix ADC client support team to get these values. You can also refer to the patterns shown in the Basic SAML Configuration section.
- To set up SSO, the URLs must be accessible from public websites. You must enable the firewall or other security settings on the Citrix ADC side to enable Microsoft Entra ID to post the token at the configured URL.
- In the Sign-on URL text box, enter a URL that has the following pattern:
On the Set up Single Sign-On with SAML pane, in the SAML Signing Certificate section, for App Federation Metadata Url, copy the URL and save it in Notepad.
The Citrix ADC application expects SAML assertions to be in a specific format, which requires you to add custom attribute mappings to your SAML token attributes configuration. The following screenshot shows the list of default attributes. Select the Edit icon and change the attribute mappings.
The Citrix ADC application also expects a few more attributes to be passed back in the SAML response. In the User Attributes dialog box, under User Claims, complete the following steps to add the SAML token attributes as shown in the table:
Name Source attribute mySecretID user.userprincipalname Select Add new claim to open the Manage user claims dialog box.
In the Name text box, enter the attribute name that's shown for that row.
Leave the Namespace blank.
For Attribute, select Source.
In the Source attribute list, enter the attribute value that's shown for that row.
Select OK.
Select Save.
In the Set up Citrix ADC section, copy the relevant URLs based on your requirements.
Create a Microsoft Entra test user
In this section, you'll create a test user called B.Simon.
- Sign in to the Microsoft Entra admin center as at least a User Administrator.
- Browse to Identity > Users > All users.
- Select New user > Create new user, at the top of the screen.
- In the User properties, follow these steps:
- In the Display name field, enter
B.Simon
. - In the User principal name field, enter the username@companydomain.extension. For example,
B.Simon@contoso.com
. - Select the Show password check box, and then write down the value that's displayed in the Password box.
- Select Review + create.
- In the Display name field, enter
- Select Create.
Assign the Microsoft Entra test user
In this section, you enable the user B.Simon to use Azure SSO by granting the user access to Citrix ADC.
Browse to Identity > Applications > Enterprise applications.
In the applications list, select Citrix ADC.
On the app overview, under Manage, select Users and groups.
Select Add user. Then, in the Add Assignment dialog box, select Users and groups.
In the Users and groups dialog box, select B.Simon from the Users list. Choose Select.
If you are expecting a role to be assigned to the users, you can select it from the Select a role dropdown. If no role has been set up for this app, you see "Default Access" role selected.
In the Add Assignment dialog box, select Assign.
Configure Citrix ADC SSO
Select a link for steps for the kind of authentication you want to configure:
Publish the web server
To create a virtual server:
Select Traffic Management > Load Balancing > Services.
Select Add.
Set the following values for the web server that's running the applications:
Service Name
Server IP/ Existing Server
Protocol
Port
Configure the load balancer
To configure the load balancer:
Go to Traffic Management > Load Balancing > Virtual Servers.
Select Add.
Set the following values as described in the following screenshot:
- Name
- Protocol
- IP Address
- Port
Select OK.
Bind the virtual server
To bind the load balancer with the virtual server:
In the Services and Service Groups pane, select No Load Balancing Virtual Server Service Binding.
Verify the settings as shown in the following screenshot, and then select Close.
Bind the certificate
To publish this service as TLS, bind the server certificate, and then test your application:
Under Certificate, select No Server Certificate.
Verify the settings as shown in the following screenshot, and then select Close.
Citrix ADC SAML profile
To configure the Citrix ADC SAML profile, complete the following sections:
Create an authentication policy
To create an authentication policy:
Go to Security > AAA – Application Traffic > Policies > Authentication > Authentication Policies.
Select Add.
On the Create Authentication Policy pane, enter or select the following values:
- Name: Enter a name for your authentication policy.
- Action: Enter SAML, and then select Add.
- Expression: Enter true.
Select Create.
Create an authentication SAML server
To create an authentication SAML server, go to the Create Authentication SAML Server pane, and then complete the following steps:
For Name, enter a name for the authentication SAML server.
Under Export SAML Metadata:
Select the Import Metadata check box.
Enter the federation metadata URL from the Azure SAML UI that you copied earlier.
For Issuer Name, enter the relevant URL.
Select Create.
Create an authentication virtual server
To create an authentication virtual server:
Go to Security > AAA - Application Traffic > Policies > Authentication > Authentication Virtual Servers.
Select Add, and then complete the following steps:
For Name, enter a name for the authentication virtual server.
Select the Non-Addressable check box.
For Protocol, select SSL.
Select OK.
Configure the authentication virtual server to use Microsoft Entra ID
Modify two sections for the authentication virtual server:
On the Advanced Authentication Policies pane, select No Authentication Policy.
On the Policy Binding pane, select the authentication policy, and then select Bind.
On the Form Based Virtual Servers pane, select No Load Balancing Virtual Server.
For Authentication FQDN, enter a fully qualified domain name (FQDN) (required).
Select the load balancing virtual server that you want to protect with Microsoft Entra authentication.
Select Bind.
Note
Be sure to select Done on the Authentication Virtual Server Configuration pane.
To verify your changes, in a browser, go to the application URL. You should see your tenant sign-in page instead of the unauthenticated access that you would have seen previously.
Configure Citrix ADC SSO for header-based authentication
Configure Citrix ADC
To configure Citrix ADC for header-based authentication, complete the following sections.
Create a rewrite action
Go to AppExpert > Rewrite > Rewrite Actions.
Select Add, and then complete the following steps:
For Name, enter a name for the rewrite action.
For Type, enter INSERT_HTTP_HEADER.
For Header Name, enter a header name (in this example, we use SecretID).
For Expression, enter aaa.USER.ATTRIBUTE("mySecretID"), where mySecretID is the Microsoft Entra SAML claim that was sent to Citrix ADC.
Select Create.
Create a rewrite policy
Go to AppExpert > Rewrite > Rewrite Policies.
Select Add, and then complete the following steps:
For Name, enter a name for the rewrite policy.
For Action, select the rewrite action you created in the preceding section.
For Expression, enter true.
Select Create.
Bind a rewrite policy to a virtual server
To bind a rewrite policy to a virtual server by using the GUI:
Go to Traffic Management > Load Balancing > Virtual Servers.
In the list of virtual servers, select the virtual server to which you want to bind the rewrite policy, and then select Open.
On the Load Balancing Virtual Server pane, under Advanced Settings, select Policies. All policies that are configured for your NetScaler instance appear in the list.
Select the check box next to the name of the policy you want to bind to this virtual server.
In the Choose Type dialog box:
For Choose Policy, select Traffic.
For Choose Type, select Request.
Select OK. A message in the status bar indicates that the policy has been configured successfully.
Modify the SAML server to extract attributes from a claim
Go to Security > AAA - Application Traffic > Policies > Authentication > Advanced Policies > Actions > Servers.
Select the appropriate authentication SAML server for the application.
In the Attributes pain, enter the SAML attributes that you want to extract, separated by commas. In our example, we enter the attribute
mySecretID
.To verify access, at the URL in a browser, look for the SAML attribute under Headers Collection.
Create a Citrix ADC test user
In this section, a user called B.Simon is created in Citrix ADC. Citrix ADC supports just-in-time user provisioning, which is enabled by default. There is no action for you to take in this section. If a user doesn't already exist in Citrix ADC, a new one is created after authentication.
Note
If you need to create a user manually, contact the Citrix ADC client support team.
Test SSO
In this section, you test your Microsoft Entra single sign-on configuration with following options.
Click on Test this application, this will redirect to Citrix ADC Sign-on URL where you can initiate the login flow.
Go to Citrix ADC Sign-on URL directly and initiate the login flow from there.
You can use Microsoft My Apps. When you click the Citrix ADC tile in the My Apps, this will redirect to Citrix ADC Sign-on URL. For more information about the My Apps, see Introduction to the My Apps.
Next steps
Once you configure Citrix ADC you can enforce session control, which protects exfiltration and infiltration of your organization’s sensitive data in real time. Session control extends from Conditional Access. Learn how to enforce session control with Microsoft Defender for Cloud Apps.