Get inactive AAD Users
Appearance
Connect to Tenant
Install-Module Microsoft.Graph -Scope CurrentUser (if not there allready) Connect-MgGraph -Scopes "User.Read.All", "Directory.Read.All", "Auditlog.Read.All"
Set inactivity Date
$inactiveDate = (Get-Date).AddDays(-90)
Get all Users
$users = Get-MgUser -All:$true -Property Id, DisplayName, UserPrincipalName, UserType, SignInActivity
== select users who not singin after inactivity date
$inactiveUsers = $users | Where-Object { $_.SignInActivity.LastSignInDateTime -lt $inactiveDate} | Select-Object DisplayName, UserPrincipalName, UserType
list users
$inactiveUsers