azure-ad-b2c / samples

Azure AD B2C custom policy solutions and samples.
825 stars 596 forks source link

Error when using SAML in a subjourney #300

Open Tiberriver256 opened 2 years ago

Tiberriver256 commented 2 years ago

I'm using the sample provided here: https://github.com/azure-ad-b2c/samples/blob/master/policies/default-home-realm-discovery/policy/SignIn_HRD.xml

Everything seems to work fine but when AAD redirects back to AAD B2C it results in the following error in the logs:

{
    "Kind": "FatalException",
    "Content": {
      "Time": "7:53 PM",
      "Exception": {
        "Kind": "Handled",
        "HResult": "80131515",
        "Message": "ValidateAsync is not supported for Web.TPEngine.Providers.RestfulProvider",
        "Data": {}
      }
    }
  }

Any ideas what that error might mean?

JasSuri commented 2 years ago

Have you added a REST API technical profile? It’s complaining about a RESTful provider.

Tiberriver256 commented 2 years ago

@JasSuri - Thanks for the response. I didn't have any RESTful provider added which was the weird part. I did however find out the error only shows up when doing the SAML federation inside of a subjourney.

davidspiess commented 2 years ago

Same error message, but with a OIDC provider inside of a subjourney.

JasSuri commented 2 years ago

Can one of you post your files? We have definitely used OIDC providers within subjourneys without issues. Make sure to re-upload the final file which contains the relyingparty section to check for final syntax.

mrcunninghamz commented 1 year ago

@JasSuri I am having a similar issue calling a SAML Provider from a subjourney. Could you possibly post a code example in the repo for us to study and compare with our policy to see what we could possibly be doing wrong?