Hello Luis Sebastiao
I would like to contribute to the "Online" registration method (get-windowsautopilotinfo.ps1 -online).
Andrew's post may help you with Graph and Enterprise Application permissions:
https://andrewstaylor.com/2023/06/13/authenticating-to-new-get-windowsautopilotinfo/
Powershell:
#Define variables
Install-Module -Name Az.Storage -force
Install-Script -Name Get-WindowsAutoPilotInfo -force
get-windowsautopilotinfo.ps1 -online -TenantID 12345 -appid 12345 -appsecret 12345