# Setting Up Azure AD as SAML enterprise connection missing steps and getting error

**URL:** <https://community.auth0.com/t/setting-up-azure-ad-as-saml-enterprise-connection-missing-steps-and-getting-error/109547>\
**Category:** Get Help\
**Tags:** connections, saml-enterprise-connection\
**Created:** [June 19, 2023, 1:46pm UTC](https://community.auth0.com/t/setting-up-azure-ad-as-saml-enterprise-connection-missing-steps-and-getting-error/109547 "2023-06-19T13:46:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thiago.aragao](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@thiago.aragao](https://community.auth0.com/u/thiago.aragao)\
**Post date:** [June 19, 2023, 1:46pm UTC](https://community.auth0.com/t/setting-up-azure-ad-as-saml-enterprise-connection-missing-steps-and-getting-error/109547/1 "2023-06-19T13:46:44Z")

</div>

Hi everybody,

I’m trying to setup the Azure AD as SAML entreprise connection in my Auth0 to register the application in Azure Application Marketplace.

I’m following this guide ( [Setting up Azure AD as SAML enterprise connection - Auth0 Community](https://community.auth0.com/t/setting-up-azure-ad-as-saml-enterprise-connection/87829)), but i have identified some miss steps, and still not able to got success in this communication. What i’m still missing to make it work?

Bellow i’m adding the steps (replicating the steps in the FAQ link above) and adding extra steps that i did to stop to got some errors:

Azure setup:

1. Open [portal.azure.com](https://portal.azure.com/)

2. Go to **Azure Active Directory \> Enterprise applications \> + New Application**

3. Now click **+ Create your own application**

4. For convenience, put **AzureViaSaml** under the **What’s the name of your app?**

5. Under **What are you looking to do with your application?** select the **Integrate any other application you don’t find in the gallery (Non-gallery)** and click **Create**

6. Now click **Single sign-on** in the left pane and under **Select a single sign-on method** select **SAML**

7. In the **1. Basic SAML Configuration** box click **Edit**

8. Under **Identifier (Entity ID)** set up identifier as per this example: **urn:auth0:your-auth0-domain:connection-name**

- Note, that the connection doesn’t exist in Auth0 at this point, so you can choose any name. In this example let’s name the connection **AzureViaSaml**. So the resulting identifier will be **urn:auth0:myDomain:AzureViaSaml**

- Don’t include the full tenant URL in the Identifier, just the tenant name. It shouldn’t be urn:auth0:[myDomain.us.auth0.com](http://mydomain.us.auth0.com/):AzureViaSaml

1. Set the **Reply URL (Assertion Consumer Service URL)** to **[https://myDomain.region\*.auth0.com/login/callback?connection=AzureViaSaml](https://mydomain.region%2A.auth0.com/login/callback?connection=AzureViaSaml)**, or **[https://myDomain.auth0.com/login/callback?connection=AzureViaSaml](https://mydomain.auth0.com/login/callback?connection=AzureViaSaml)** if your tenant was created before 11 June 2020.

- 
  - Region could be us, au, eu, jp. E.g.: myDomain. **us**.[auth0.com](http://auth0.com/)

1. Click **Save**

2. In the **3. SAML Signing Certificate** box click **Download** next to **Certificate (Base64)**

3. In the **4. Set up AzureViaSaml** box copy the Login URL. It will look like [https://login.microsoftonline.com/xxx/saml2](https://login.microsoftonline.com/xxx/saml2)

4. In the created Enterprise Application go to **Manage \> User and Groups** click on **Add user/group** to add a user to allow you to test in further steps

5. Now let’s move to Auth0 setup

Auth0 Setup:

1. Go to [**Dashboard \> Authentication \> Enterprise \> SAML \> + Create connection**](https://manage.auth0.com/#/connections/enterprise/samlp/create)

2. Set the name to **AzureViaSaml**

3. Set the **Sign In URL** and the **Sign Out URL** value to the link you copied in Step 12 in Azure setup (e.g. [https://login.microsoftonline.com/xxx/saml2](https://login.microsoftonline.com/xxx/saml2))

4. Upload the **X509 Signing Certificate** that you downloaded from Azure in Step 11

5. Click **Create**

6. Go on **IdP-Initiated SSO** , select **Accept Requests** , select the **Default Application** and the **Response Protocol**

7. Go on \*\* Applications\*\* tab, and toggle to on the application that you need allow to user use the SAML enterprise connection

Launch your application and try the connection. You can also go to **[Dashboard \> Authentication \> Enterprise \> SAML](https://manage.auth0.com/#/connections/enterprise/samlp)** , click **three dots** next to the connection you just created and select **Try**.

Explanations and related doubts:

The **step 13 in Azure Setup** i’ve added after get error trying to test the integration. Is necessary to have a user authorized in the Enterprise application

The **step 7 in Auth0 Setup** i’ve added after get the error “ **invalid\_request** : IdP-Initiated login is not enabled for connection “AzureViaSaml”.” trying to test the integration. I’ve selected my SPA Application as “Default Application” and on Response Protocol i got doubt which one i should select, which one should i pick? Open-Id Connect, SAML or WS-Fed

The **step 8 in Auth0 Setup** i’ve added after get the error " **invalid\_request** : The connection with name: “AzureViaSaml” (my-tenant - code) was not found."

Now i’m get stuck because after try test the connection i’ve got the following page redirection:

[https://localhost:4200/?error=access\_denied&error\_description=Audience%20is%20invalid.%20Configured%3A%20urn%3Aauth0%3my-tenant%3AAzureViaSaml](https://localhost:4200/?error=access_denied&error_description=Audience%20is%20invalid.%20Configured%3A%20urn%3Aauth0%253my-tenant%3AAzureViaSaml)

What’s should i do now? What the step to finish this connection and got success?

Best Regards

---

<div class="post-metadata">

**Author:** ![infrastructure](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/infrastructure/32/12811_2.png) [@infrastructure](https://community.auth0.com/u/infrastructure)\
**Post date:** [January 30, 2024, 12:08am UTC](https://community.auth0.com/t/setting-up-azure-ad-as-saml-enterprise-connection-missing-steps-and-getting-error/109547/2 "2024-01-30T00:08:38Z")

</div>

@thiago.aragao , did you find an answer to your questions? I went through nearly an identical path as you and have a different error, but may be related.

_Request Id: 03f5c33f-7c59-46ad-85a9-5ff957324e00_  
_Correlation Id: a2055e3a-7151-4591-a045-bfb4323534be_  
_Timestamp: 2024-01-30T00:08:00Z_  
_Message: AADSTS20012: An error occurred when we tried to process a WS-Federation message. The message was invalid, malformatted, or contains potentially dangerous characters._

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [February 18, 2025, 6:57pm UTC](https://community.auth0.com/t/setting-up-azure-ad-as-saml-enterprise-connection-missing-steps-and-getting-error/109547/6 "2025-02-18T18:57:27Z")

</div>

Hi @thiago.aragao

Welcome to the Auth0 Community.  
I am sorry about the late reply to your inquiry.

If you still need assistance with this issue, you can review the steps for the[knowledge article](https://support.auth0.com/center/s/article/Configure-IdP-Initiated-SAML-Login-with-Azure-as-the-IdP) linked since it has been updated since the last time you have attempted the setup. By following the steps, you should be able to implement everything without running into any issues.

If you have any other questions, feel free to leave a reply or post again on the community!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 4, 2025, 6:57pm UTC](https://community.auth0.com/t/setting-up-azure-ad-as-saml-enterprise-connection-missing-steps-and-getting-error/109547/7 "2025-03-04T18:57:53Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
