# Cannot POST /auth/strategy/callback SAML

**URL:** <https://discourse.nodered.org/t/cannot-post-auth-strategy-callback-saml/87956>\
**Category:** General\
**Tags:** security\
**Created:** [14 May 2024 17:04 UTC](https://discourse.nodered.org/t/cannot-post-auth-strategy-callback-saml/87956 "2024-05-14T17:04:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![malee](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@malee](https://discourse.nodered.org/u/malee)\
**Post date:** [14 May 2024 17:04 UTC](https://discourse.nodered.org/t/cannot-post-auth-strategy-callback-saml/87956/1 "2024-05-14T17:04:44Z")

</div>

I notice this topic has arisen before.

I have being experimenting with passport in Node-RED.

All seems good for OAuth and OIDC via Azure, however I am having issues with SAML.

I created an identity provider as an Enterprise app within the Azure portal.

Are there any plans to allow for SAML with a passport SAML strategy to be compatible in version 4.0.0? Or would I need to add an endpoint to listen for this POST request?

Also I notice some previous posts relating to the issue.

 ![Screenshot 2024-05-14 175641](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/91a7e2c512f301a4dbc5d88a1ca9d40f652eaa67.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [14 May 2024 17:59 UTC](https://discourse.nodered.org/t/cannot-post-auth-strategy-callback-saml/87956/2 "2024-05-14T17:59:42Z")

</div>

> [@malee](#):
>
> notice this topic has arisen before.

Can you link to these previous posts?

Any saml based passport strategy should work with Node-RED. Can you share how you have configured it (excluding any tokens of course).

---

<div class="post-metadata">

**Author:** ![malee](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@malee](https://discourse.nodered.org/u/malee)\
**Post date:** [15 May 2024 08:38 UTC](https://discourse.nodered.org/t/cannot-post-auth-strategy-callback-saml/87956/3 "2024-05-15T08:38:03Z")

</div>

No problem, thanks for having time 🙂

This one is [OIDC](https://discourse.nodered.org/t/cannot-post-auth-strategy-callback/68886)

However this [strategy implementation for Azure works](https://discourse.nodered.org/t/azure-ad-authentication-example/40937), due to the use of the parameters

```auto
responseType: "code",
responseMode: "query",

```

I tried those with this strategy, but they were not compatible.

I am using the SAML-P endpoint, apologies if the next code is very much Hello World!

```auto
adminAuth: {
    type: "strategy",
    strategy: {
      name: "saml",
      label: "Sign in with Entra ID",
      icon: "fa-windows",
      strategy: require("passport-saml").Strategy,
      options: {
        issuer: "very-secret-issuer",
        entryPoint: "https://login.microsoftonline.com/top-secret-uid/saml2",
        cert: "almost-definitely-a-secret-cert,
        callbackUrl: "http://localhost:1880/auth/strategy/callback",
        verify: function (accessToken, refreshToken, profile, done) {
          // @todo
          done(null, profile);
        },
        autoLogin: true,
      },
    },
    users: function (user) {
      return Promise.resolve({ username: user, permissions: "*" });
    },
  },

```

Looks like more tinkering...

---

<div class="post-metadata">

**Author:** ![malee](https://avatars.discourse-cdn.com/v4/letter/m/ac8455/32.png) [@malee](https://discourse.nodered.org/u/malee)\
**Post date:** [17 May 2024 12:42 UTC](https://discourse.nodered.org/t/cannot-post-auth-strategy-callback-saml/87956/4 "2024-05-17T12:42:07Z")

</div>

It was discovered that if I added the following, it worked

```auto
callbackMethod: "POST"

```

It's self evident but here is a link to the [commit](https://github.com/node-red/node-red/commit/a1f135bd66ee625ff0299371a63b8b15f88ef1fc)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 August 2024 12:43 UTC](https://discourse.nodered.org/t/cannot-post-auth-strategy-callback-saml/87956/5 "2024-08-15T12:43:06Z")

</div>

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