We have WebApp in Azure runnig with the Azure authentication.
We haven’t provided any login code to the vaadin app. All this is provided by azure.
Similar to https://www.youtube.com/watch?v=O1QmK_q2Xfw
How can we get the logged username?
It depends on the security framework you’re using. If you’re using Spring Security, there’s a security utility AuthenticationContext
you can use: https://vaadin.com/docs/latest/flow/security/enabling-security#security-utilities
Note that if you’re not using Spring Security, it will fail with an exception.
If you are using Spring Security you can also use the SecurityContexHolder Servlet Authentication Architecture :: Spring Security
If I understood correctly, authentication is performed by a third party component not integrated in the app. Most likely you can read information from some HTTP header when you get redirected to the application
Maybe this User identities in AuthN/AuthZ - Azure App Service | Microsoft Learn