On Premise AD does not update the Azure AD Sign-in Logs and O365 User Activity report does not include the interactive sign in performed by users.
Need PowerShell script to fetch each Azure AD user Sign-in logs, trying to reconcile the On-premise users last login data with Azure AD Sign-in activity to find inactive users.
Get-MSolUser and Get-AzureAdUser does not include the required data and the details are required for unlicensed users also.
Assuming Inactive users to be the one who have not signed-in in last 90 days.