SQL script to check date of last login of user to SQL server based on condition
Hello, I would like to know the date/time when user has connected SQL server last time. In my case, I do not have individual user's login created in SQL server, there are AD groups created under logins and all users are mapped to that AD groups. Now I want script to check the user id inside the AD group and show us the result. For example, Suppose there are 2 users - User A and User B inside 1 AD group and User A is connecting SQL regularly but User B has not connected the SQL server from last lets say 100 days so script should check based on this condition and give us the information of User B id. Can someone please help me on this in making custom script.