# Azure Active Directory and BIG-IP APM Integration

**URL:** <https://community.f5.com/t/azure-active-directory-and-big-ip-apm-integration/67889>\
**Category:** F5 Technical Articles\
**Tags:** big-ip-access-policy-manager-apm, header, kerberos, azure-ad, authentication, security, series-f5-apm-and-microsoft-azure-ad-integration\
**Created:** [December 18, 2019, 2:00pm UTC](https://community.f5.com/t/azure-active-directory-and-big-ip-apm-integration/67889 "2019-12-18T14:00:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai\_Chung](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@Kai\_Chung](https://community.f5.com/u/Kai_Chung)\
**Post date:** [December 18, 2019, 2:00pm UTC](https://community.f5.com/t/azure-active-directory-and-big-ip-apm-integration/67889/1 "2019-12-18T14:00:52Z")

</div>

# **Introduction**

Security is one of the primary considerations for organizations in determining whether or not to migrate applications to the public cloud. The problem for organizations with applications in the cloud, in a data center, managed, or as a service, is to create a cost-effective hybrid architecture that produces secure application access and a great experience that allows users to access apps easily, have consistent user experiences, and enjoy easy access with single-sign-on (SSO) tied to a central identity and authentication strategy.

Some applications are not favorable to modernization. There are applications that are not suited for, or incapable of, cloud migration. Many on-premises apps do not support modern authentication and authorization, including standards and protocols such as SAML, OAuth, or OpenID Connect (OIDC). An organization may not have the staff talent or time to perform application modernization for their on-premises apps.

With thousands of apps in use daily, hosted in all or any combination of these locations, how can organizations ensure secure, appropriate user access without requiring users to login in multiple times? In addition, how can organizations terminate user access to each application without having to access each app individually?

By deploying Microsoft Azure Active Directory, Microsoft’s comprehensive cloud-based identity platform, along with F5’s trusted application access solution, Access Policy Manager (APM), organizations are able to federate user identity, authentication, and authorization and bridge the identity gap between cloud-based (IaaS), SaaS, and on-premises applications.

_Figure 1&nbsp;Secure hybrid application access_

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/3X/7/6/765b5133f9b9dff403b75476419aedd4ff8bf855.jpeg)

This guide discusses the following use cases:

·&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Users use single sign-on to access applications requires Kerberos-based authentication.

·&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Users use single sign-on to access applications requires header-based authentication.

# **Microsoft Azure Active Directory and F5 BIG-IP APM Design**

For organizations with a high security demand with low risk tolerance, the need to keep all aspects of user authentication on premise is required.

The Microsoft Azure Active Directory and F5 BIG-IP APM solution integrates directly into AAD configured to work cooperatively with an existing Kerberos based, header based or variety of authentication methods. The solution has these components:

•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BIG-IP Access Policy Manager (APM)

•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Microsoft Domain Controller/ Active Directory (AD)

•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Microsoft Azure Active Directory (AAD)

•&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Application (Kerberos-/header-based authentication)

_Figure 2&nbsp;APM bridge SAML to Kerberos/header authentication components_

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/c/cbb310a3fd1a7843d75fc5ae6284b96ba443bd24.jpeg)

_Figure 3&nbsp;APM bridge SAML to Kerberos authentication process flow_

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/3/3f8bc79463be3a9bb586cbd16c59df7e443c121c.jpeg)

# **Deploying Azure Active Directory and BIG-IP APM integration**

The joint Microsoft and F5 solution allow legacy applications incapable of supporting modern authentication and authorization to interoperate with Azure Active Directory. Even if an app doesn’t support SAML, and only is able to support header- or Kerberos-based authentication, it can still be enabled with single sign-on (SSO) and support multi-factor authentication (MFA) through the F5 APM and Azure Active Directory combination. Azure Active Directory as an IDaaS delivers a trusted root of identity to APM creating a bridge between modern and legacy applications, delivering SSO and securing the app with MFA.

## Adding F5 from the gallery

To configure the integration of BIG-IP APM into Azure AD, you need to add F5 from the gallery to your list of managed SaaS apps.

- Sign-on to the&nbsp;Azure portal&nbsp;using either a work or school account, or a personal Microsoft account.
- On the left navigation pane, select the&nbsp; **Azure Active Directory** &nbsp;service.
- Navigate to&nbsp; **Enterprise Applications** &nbsp;and then select&nbsp; **All Applications**.
- To add new application, select&nbsp; **New application**.
- In the&nbsp; **Add from the gallery** &nbsp;section, type&nbsp; **F5** &nbsp;in the search box.
- Select&nbsp; **F5** &nbsp;from results panel and then add the app. Wait a few seconds while the app is added to your tenant.

## **Configuring Microsoft Azure Active Directory**

Configure and test Azure AD SSO with F5 using a test user called&nbsp; **A.Vandelay**. For SSO to work, you need to establish a link relationship between an Azure AD user and the related user in F5.

To configure and test Azure AD SSO with F5, complete the following building blocks:

- Configure Azure AD SSO - to enable your users to use this feature.
- Create an Azure AD test user - to test Azure AD single sign-on with A.Vandelay.
- Assign the Azure AD test user - to enable A.Vandelay to use Azure AD single sign-on.

### **Configure Azure AD SSO**

Follow these steps to enable Azure AD SSO in the Azure portal.

- In the&nbsp;[Azure portal](https://portal.azure.com/), on the&nbsp; **F5** &nbsp;application integration page, find the&nbsp; **Manage** &nbsp;section and select&nbsp; **single sign-on**.
- On the&nbsp; **Select a single sign-on method** &nbsp;page, select&nbsp; **SAML**.
- On the&nbsp; **Set up single sign-on with SAML** &nbsp;page, click the edit/pen icon for&nbsp; **Basic SAML Configuration** &nbsp;to edit the settings.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/d/d941113cb9df1601901d40b9a690277492373694.png)

- On the&nbsp; **Basic SAML Configuration** &nbsp;section, if you wish to configure the application in&nbsp; **IDP** &nbsp;initiated mode, enter the values for the following fields:

- In the&nbsp; **Identifier** &nbsp;text box, type a URL using the following pattern:&nbsp;https://\<YourCustomFQDN\>.f5.com/

- In the&nbsp; **Reply URL** &nbsp;text box, type a URL using the following pattern:&nbsp;https://\<YourCustomFQDN\>.f5.com/

- Click&nbsp; **Set additional URLs** &nbsp;and perform the following step if you wish to configure the application in&nbsp; **SP** &nbsp;initiated mode:

- In the&nbsp; **Sign-on URL** &nbsp;text box, type a URL using the following pattern:&nbsp;https://\<YourCustomFQDN\>.f5.com/

**Note**

**These values are for only used for illustration. Replace these them with the actual Identifier, Reply URL and Sign-on URL. Refer to the patterns shown in the&nbsp;Basic SAML Configuration&nbsp;section in the Azure portal.**

- On the&nbsp; **Set up single sign-on with SAML** &nbsp;page, in the&nbsp; **SAML Signing Certificate** &nbsp;section, find&nbsp; **Federation Metadata XML** &nbsp;and select&nbsp; **Download** &nbsp;to download the certificate and save it on your computer.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/0/020cc5c6c7ecbe46048e2034100321f2b49d1fb4.png)

- On the&nbsp; **Set up F5** &nbsp;section, copy the appropriate URL(s) based on your requirement.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/0/04e0be16de15383524229195ad207e7c4b68176c.png)

### 

### **Create an Azure AD test user**

In this section, you’ll create a test user in the Azure portal called A.Vandelay.

- From the left pane in the Azure portal, select&nbsp; **Azure Active Directory** , select&nbsp; **Users** , and then select&nbsp; **All users**.
- Select&nbsp; **New user** &nbsp;at the top of the screen.
- In the&nbsp; **User** &nbsp;properties, follow these steps:
- In the&nbsp; **Name** &nbsp;field, enter&nbsp;A.Vandelay.
- In the&nbsp; **User name** &nbsp;field, enter the [username@companydomain.extension](mailto:username@companydomain.extension). For example,&nbsp;[A.Vandelay@contoso.com](mailto:A.Vandelay@contoso.com).
- Select the&nbsp; **Show password** &nbsp;check box, and then write down the value that’s displayed in the&nbsp; **Password** &nbsp;box.
- Click&nbsp; **Create**.

### **Assign the Azure AD test user**

In this section, you’ll enable A.Vandelay to use Azure single sign-on by granting access to F5.

- In the Azure portal, select&nbsp; **Enterprise Applications** , and then select&nbsp; **All applications**.
- In the applications list, select&nbsp; **F5**.
- In the app’s overview page, find the&nbsp; **Manage** &nbsp;section and select&nbsp; **Users and groups**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/0/c/0c628fca565755c09ebb89ccb5e3bef617a6a102.png)

- Select&nbsp; **Add user** , then select&nbsp; **Users and groups** &nbsp;in the&nbsp; **Add Assignment** &nbsp;dialog.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/a/5/a54163fbe77647b6ae99b98dbad2c6517608115b.png)

- In the&nbsp; **Users and groups** &nbsp;dialog, select&nbsp; **A.Vandelay** &nbsp;from the Users list, then click the&nbsp; **Select** &nbsp;button at the bottom of the screen.
- If you’re expecting any role value in the SAML assertion, in the&nbsp; **Select Role** &nbsp;dialog, select the appropriate role for the user from the list and then click the&nbsp; **Select** &nbsp;button at the bottom of the screen.
- In the&nbsp; **Add Assignment** &nbsp;dialog, click the&nbsp; **Assign** &nbsp;button.

## **Configure F5 BIG-IP APM**

Configure your on-premise applications based on the authentication type.

### **Configure F5 single sign-on for Kerberos-based application**

- Open your browser and access BIG-IP.
- You need to import the Metadata Certificate into the F5 (Kerberos) which will be used later in the setup process. Go to&nbsp; **System \> Certificate Management \> Traffic Certificate Management \>\> SSL Certificate List**. Click on&nbsp; **Import** &nbsp;of the right-hand corner.

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/7/77ed76790ccc40126aa821d06702e32deafb672f.jpeg)

- Additionally you also need an&nbsp; **SSL Certificate** &nbsp;for the Hostname (Kerbapp.superdemo.live), in this example we used Wildcard Certificate.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/9/9ac93d25ff61a62f4190a514bbeca515c710a80f.png)

- Go to –&nbsp; **F5 BIG-IP Click Access \> Guided Configuration \> Federation \> SAML Service Provider**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/2/2de5c8d486ca1286bb9d363a760cd54ee7ee86ed.png)

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/8/875c4bb01d3078b993948fab3d0fb074694592f6.png)

- Specify the&nbsp; **Entity ID** &nbsp;(same as what you configured on the Azure AD Application Configuration).

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/0/7/078d7290d4e6a77ae7fbc3ced74192ef9f6ba42e.png)

- Create a new Virtual Server, Specify the&nbsp; **Destination Address**. Choose the&nbsp; **Wild Card Certificate** &nbsp;(or&nbsp; **Cert** &nbsp;you uploaded for the Application) that we uploaded earlier and the&nbsp; **Associated Private Key**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/b/bb0f82f0c931f135934f0b67e04afe07117c44ba.png)

- Upload the Configuration&nbsp; **Metadata** &nbsp;and Specify a new&nbsp; **Name for SAML IDP Connector** &nbsp;and you will also need to specify the Federation Certificate that was uploaded earlier.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/a/2/a28b5bcf989b6f69fc4e11443b1177c7ae3e308f.png)

- **Create New** &nbsp;Backend App Pool, specify the&nbsp;**IP Address(s)**&nbsp;of the Backend Application Servers.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/e/e084d21b80ac8add3239b932064a3073d4b44d33.png)

- Under&nbsp; **Single Sign-on Settings** , choose&nbsp; **Kerberos** &nbsp;and Select&nbsp; **Advanced Settings**. The request needs to be created in&nbsp;[user@domain.suffix](mailto:user@domain.suffix).
- Under the&nbsp; **username source** &nbsp;specify&nbsp;session.saml.last.attr.name.[http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname](http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname). Refer Appendix for complete list of variables and values. Account Name Is the F5 Delegation Account Created ( Check F5 Documentation).

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/d/d5c0dc16cf5b01122bf64a290f7175ac20807b54.jpeg)

- Under Endpoint Checks Properties , click **Save & Next**.

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/a/a6985fc99c5497ffe6b2d624668e5baad41e2c67.jpeg)

- Under Timeout Settings, leave default settings and click **Save & Next**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/f/fbdc5542c5bc46963da5e4265a88eece70861aa7.png)

- **Review Summary** &nbsp;and click on&nbsp; **Deploy**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/6/64590927ba294ce0afbfa777687c74fb39cd6388.png)

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/6/68fefb45a0e2312e4f4d2af4969d60dd13b54281.jpeg)

### **Configure F5 single sign-on for Header-based application**

- Open your browser and access BIG-IP.

- You need to import the Metadata Certificate into the F5 (Header Based) which will be used later in the setup process. Go to&nbsp; **System \> Certificate Management \> Traffic Certificate Management \>\> SSL Certificate List**. Click on&nbsp; **Import** &nbsp;of the right-hand corner.

- Additionally you also need an&nbsp; **SSL Certificate** &nbsp;for the Hostname (headerapp.superdemo.live), in this example we used Wildcard Certificate.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/0/03c23ddf9218a0390eb2db37be22c9a0b3cedbd0.png)

- Go to –&nbsp;**F5 (Header Based) BIG-IP Click Access \> Guided Configuration \> Federation \> SAML Service Provider**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/1/117e8327d7615f5f9c04c0efca2a98d2cabc60e7.png)

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/1X/472c86d3031815089b4f386270c7bd5abcbbd7e9.jpeg)

- Specify the&nbsp; **Entity ID** &nbsp;(same as what you configured on the Azure AD Application Configuration).

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/5/583405ea3f04cd60d15a98f237be1b802ab37120.jpeg)

- Create a new Virtual Server, Specify the&nbsp; **Destination Address** ,&nbsp; **Redirect Port** &nbsp;is Optional. Choose the&nbsp; **Wild Card Certificate** &nbsp;(or&nbsp; **Cert** &nbsp;you uploaded for the Application) that we uploaded earlier and the&nbsp; **Associated Private Key**.

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/4/46195b5f6e667626ca0b7512ccd1f5652dbc3408.jpeg)

- Upload the Configuration&nbsp; **Metadata** &nbsp;and Specify a new&nbsp; **Name for SAML IDP Connector** &nbsp;and you will also need to specify the Federation Certificate that was uploaded earlier.

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/a/a9e79f2af1f5d697510a27246faf42506b12de54.jpeg)

- **Create New** &nbsp;Backend App Pool, specify the&nbsp;**IP Address(s)**&nbsp;of the Backend Application Servers.

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/5/5ab61513b29fdb110caa8afeaa7136183d0033e3.jpeg)

- Under Single Sign-on, Choose&nbsp; **HTTP header-based**. You can add other Headers based on your application. See the Appendix for the list of SAMLSession Variables.

 ![image_286351.jpg](https://d20hrnpixdzcsd.cloudfront.net/original/2X/4/481e5e8844ee92fd0e526fd6287f0c8166dc597f.jpeg)

- Under Endpoint Checks Properties , click **Save & Next**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/c/2/c2e8164f837f4f92a8819c60e7cd54db57ddaffe.png)

- Under Timeout Settings, leave default settings and click **Save & Next**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/4/b/4b1cba2bf46efd396490b51aae3d4bc8263bb83a.png)

- **Review Summary** &nbsp;and click on&nbsp; **Deploy**.

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/6/693a4f0da2b82a409086831f6bddaf308642369c.png)

 ![image_286351.png](https://d20hrnpixdzcsd.cloudfront.net/original/2X/2/2ad173241c375293bf790e04d684eb5151396e68.png)

# **Resources**

[BIG-IP Knowledge Center](https://support.f5.com/csp/knowledge-center/software/BIG-IP?module=BIG-IP%20APM)

[BIG-IP APM Knowledge Center](https://support.f5.com/csp/knowledge-center/software/BIG-IP?module=BIG-IP%20APM)

[Configuring Single Sign-On with Access Policy Manager](https://techdocs.f5.com/kb/en-us/products/big-ip_apm/manuals/product/apm-authentication-single-sign-on-11-6-0/21.html)

# **Summary**

By centralizing access to all your applications, you can manage them more securely. Through the F5 BIG-IP APM and Azure AD integration, you can centralize and use single sign-on (SSO) and multi-factor authentication for on-premise applications.

# **Validated Products and Versions**

### Product

- BIG-IP APM

### Version

- 15.0

---

<div class="post-metadata">

**Author:** ![PedroBastidas](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@PedroBastidas](https://community.f5.com/u/PedroBastidas)\
**Post date:** [February 27, 2021, 1:09am UTC](https://community.f5.com/t/azure-active-directory-and-big-ip-apm-integration/67889/2 "2021-02-27T01:09:05Z")

</div>

Hi [**Kai Chung**](https://devcentral.f5.com/s/profile/0051T000008cTJ5QAM) **,**

Excellent information. I had been able to deploy the integration between Azure AD and F5 APM for application with SSO like Kerberos or Headers. However, I need to deploy an application that requires SSO forms, so I need to keep the user’s **password** in F5.

Do you know how to configure Azure AD as SAML IDP and F5 APM as SAML SP, but F5 can capture the password?

Thanks,

PB

---

<div class="post-metadata">

**Author:** ![Sam\_Novak](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@Sam\_Novak](https://community.f5.com/u/Sam_Novak)\
**Post date:** [March 9, 2021, 2:50pm UTC](https://community.f5.com/t/azure-active-directory-and-big-ip-apm-integration/67889/3 "2021-03-09T14:50:31Z")

</div>

I utilize on-prem ADFS with the Azure MFA plugin to solve this, but I too have applications that I need to capture passwords for, but given the way SAML works (as I understand it) there isn’t a way to capture/return a cleartext PW from the IdP (ADFS, Azure, etc) to the APM session for use in SSO configs.

This is makes things like NTLM auth, Peoplesoft/Oracle pages and simple form based sign-ins annoying because of the double auth, but it’s what we have. I really wish Microsoft would provide an interface/snippets to integrate azure MFA directly into an APM sign-in form like DUO does; it’s one of a handful of shortcomings we’ve found as we begin migrating from DUO to Azure MFA.

\<soapbox\>

The other big one for us is the Azure MFA authenticator app is very lacking when it comes to the user interface; with DUO, you see what app is being prompted for, and from where; authenticator is just ‘Approve this, yes/no’.

\</soapbox\>

---

<div class="post-metadata">

**Author:** ![Kannan\_Zenith](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@Kannan\_Zenith](https://community.f5.com/u/Kannan_Zenith)\
**Post date:** [March 9, 2021, 5:53pm UTC](https://community.f5.com/t/azure-active-directory-and-big-ip-apm-integration/67889/4 "2021-03-09T17:53:11Z")

</div>

Can I use Azure SSO to login centrally to the BIG-IP console web page for managing it.

---

<div class="post-metadata">

**Author:** ![Nikoolayy1](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nikoolayy1/32/3589_2.png) [@Nikoolayy1](https://community.f5.com/u/Nikoolayy1)\
**Post date:** [October 9, 2022, 7:50pm UTC](https://community.f5.com/t/azure-active-directory-and-big-ip-apm-integration/67889/5 "2022-10-09T19:50:56Z")

</div>

Nice article ! What about the new Azure AD guided configuration that is specificly for Azure AD?

> **[Lab 1: Deploy an API Protection Profile](https://clouddocs.f5.com/training/community/iam/html/class2/module4/lab01.html)**
