If I was doing this, I would grab this script and modify it for my needs:
https://gallery.technet.microsoft.com/scriptcenter/Report-on-Azure-AD-Stale-8e64c1c5
then set the "stale time"I wanted
and set the filter to member instead of guest
$Filter = "UserType eq 'Member'"
$Guests = Get-AzureADUser -All $true -Filter $Filter
Run it and now you have a list of people who haven't logged from that csv.
then run:
Import-csv <output.csv> |% {Get-AzureADUser -ObjectId $_.ObjectID | Set-AzureADUser -AccountEnabled $false}