SAML Access Denied from Azure AD - Localhost Sustainsys Setup

Verool Kuniyil Shibin 5 Reputation points
2025-06-25T12:23:13.2633333+00:00

I am trying to set up an SAML based authentication using ASP.Net framework 4.8. But after login i am returning back to my localhost site and getting error like https://localhost:44353/Saml2/Acs?error=access_denied . I have assigned users and all the configurations are correct.

Developer technologies | ASP.NET | ASP.NET API
{count} votes

1 answer

Sort by: Most helpful
  1. Danny Nguyen (WICLOUD CORPORATION) 410 Reputation points Microsoft External Staff
    2025-06-26T09:53:38.98+00:00

    Hi @Verool Kuniyil Shibin ,

    I suggest you check out this instruction to debug this problem from Microsoft: https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/debug-saml-sso-issues

    https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/adfs-2-error-access-is-denied?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#resolution

    Here are things I recommend looking out for:

    Sign-in logs:

    In Microsoft Entra, go to Users and select the user who most recently attempted to sign in. Then, click on Sign-in logs from the left-hand panel under the user's name. This will show whether the sign-in was successful or failed.

    If the sign-in failed, check the Conditional Access section to identify any policies that might be blocking the user from accessing the application.

    Authorization Rules:

    Check the issuance authorization rules for the relying party. If you have strict rules set up, it's possible that the user isn't meeting the criteria for token issuance. Make sure to check if all the necessary rules are defined and whether any deny rules are overriding allow rules.

    Reply URL Configuration:

    Ensure your application's reply URL (Assertion Consumer Service URL) is correctly set up. If the reply URL points to localhost or an incorrect endpoint, Azure AD might not know where to send the token. Double-check the configuration on the Azure side.

    Testing SSO:

    Utilize the Test SSO feature in the Microsoft Entra admin center for your application. It can provide error resolution guidance tailored to your setup.

    If you feel like this might be related to your implementation of the application, please send me your implementation of SAML in your program.cs.

    I also suggest posting this problem under Azure and Entra tags to get more insights from this problem.

    Feel free to reach out if you have any problems.

    Best regards


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.