token lost in the redirection between application gateway and identity server in azure

dotnetcoreapi 1 Reputation point
2020-08-11T10:19:13.28+00:00

We have azure environment with application gateway which has ui and api services with ingress controller.

When user launches the url of the SPA web application user is redirected to Microsoft Identity Server. After the login is done user is redirected back to the web browser with token to the host

e.g. https://host.com/#id_token.eysdfasfds .

We are using ADAL js and it works in local environment.Since local environment doesn't have application gateway we had no issue.

When we moved to UAT where we have Application gateway with ingress routing the application stopped working which means the token is lost in redirection. The ADALjs library js which ideally relies on this url e.g. https://host.com/#id_token.eysdfasfds is not able to read it.

Any settings we need to do with azure application gateway.?

    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      name: myingress
      annotations:
        kubernetes.io/ingress.class: azure/application-gateway
        appgw.ingress.kubernetes.io/use-private-ip: "true"
        appgw.ingress.kubernetes.io/ssl-redirect: "true"
        appgw.ingress.kubernetes.io/backend-path-prefix: /
    spec:
      tls:
        - secretName: mysecret
      rules:
      - host: dev-ingress.com
      - http:
          paths:
          - path: /
            backend:
              serviceName: uidev
              servicePort: 80
          - path: /gateway
            backend:
              serviceName: ocelotapigatewaydev
              servicePort: 80
Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
965 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,958 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,664 questions
{count} votes