Restrict Web App acess authentication
Do you want to restrict access to your Web App to specific users or groups within your organization? (which is by default enabled for all the users in the tenant).
This post will guide you on how to use Microsoft Entra ID to secure your web app by managing authentication and authorization for users or security groups.
You can restrict the user completely to not grant access to the application in Entra Id by checking the "Assignment required" box in your Enterprise application properties.

From Entra Id search "Enterprise Applications" ans search your application by name or id.
Switch over to "Users and groups" to assign specific users or groups to this app.

Now only the above assigned users or group members are allowed to access the application.
Not authorized users will have the following error message when accessing to the application:

Enjoy!