Before authentication with azure our custom command like:
$m365Credentials = $Context.GetOffice365Credential()
Connect-MSGraph -Credential $m365Credentials
Get-IntuneManagedDevice | Where-Object {($.emailAddress -match "%mail%") -and ($.operatingSystem -eq "Android")}
works well, now without credential how should i modify the script to make it work?