Static webapp problem - No reply address provided

Niklas Åsberg 0 Reputation points
2024-12-19T15:14:55.9533333+00:00

I am hosting an Angular Single Page Application (SPA) on Azure Static Web Apps, and I am trying to enable Azure Active Directory (AAD) authentication for the front-end. Despite configuring the app registration and Azure Static Web App settings, authentication fails, and users are unable to log in.
User's image

Details

  1. Application Overview
  • Front-end: Angular SPA hosted on Azure Static Web Apps.
  • Backend APIs: Accessed via separate services (currently not secured; only front-end authentication is being implemented).
  • Authentication Provider: Azure Active Directory (AAD).
  1. Steps Taken
  • Created an Azure AD App Registration for the SPA.
  • Configured Redirect URIs for the SPA under Single Page Application:
    • https://mc-app-tst.lantmannen.com/.auth/login/aad/callback
    • https://mc-app-test.azcn.lantmannen.com/.auth/login/aad/callback

User's image

User's image

  • Updated the staticwebapp.config.json file to enforce authentication with the following configuration:

{

"routes": [

    {

        "route": "/*",

        "allowedRoles": [

            "authenticated"

        ]

    }

],

"responseOverrides": {

    "401": {

        "redirect": "/.auth/login/aad",

        "statusCode": 302

    }

},

"auth": {

    "identityProviders": {

        "azureActiveDirectory": {

            "registration": {

                "openIdIssuer": "https://login.microsoftonline.com/<TENANT_ID>/v2.0",

                "clientId": "<CLIENT_ID>"

            }

        }

    }

},

"navigationFallback": {

    "rewrite": "/index.html",

    "exclude": [

        "/*.{png,ico,svg}",

        "/assets/*"

    ]

},

"forwardingGateway": {

    "allowedForwardedHosts": []

},

"networking": {

    "allowedIpRanges": [

        "0.0.0.0/0"

    ]

}
```}

Issue Observed

- When accessing the app, users are redirected to the Azure AD login page.

- After login, the authentication process fails with the following error:

  - **Error Code**: `900971`
  
  - **Error Message**: "No reply address provided."
  
- Azure AD Sign-In Logs show that MFA is completed, but the error indicates that no valid reply address is provided:

  - **Application**: `App-ConNy-Login-TST`
  
  - **Failure Reason**: No reply address provided.
  
  - **Sign-in error code**: `900971`.
  
![User's image](/api/attachments/b688a825-3b14-4107-9f32-a85a37813947?platform=QnA)



I've added the corresponding redirect URIs to my App Registration.

Could you see the problem why is says "No reply address provided" even though i've clearly added these

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,021 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,645 questions
{count} votes

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.