Views:
Issue: User can login and view data on D365 App even when the user is not assigned a proper D365 license

Root Cause:
1. User is assigned PowerApps license.
2. User in D365 is under a Team which is assigned a Security Role. 
3. User with PowerApps license and with an inherited role from Team can access D365 App.

Solution:
1. Remove the Security Role from Team
2. Create a "Security Group" and assign it to the D365 App. Only allow user in the "Security Group" to access.
See https://docs.microsoft.com/en-us/power-platform/admin/control-user-access