Forum Discussion
How to create a backup of your Microsoft Endpoint Manager (Intune) infrastructure!
TomWechsler
The script no longer works.
Microsoft deleted Intune PowerShell application ID (d1ddf0e4-d672-4dae-b554-9d5bdfd93547) which by default is used in Connect-MsGraph.
Resolution
Create Azure AD application in tenant with permission the same as Enterprise Application Microsoft Intune PowerShell then before cmdlet Connect-MsGraph
Use Update-MSGraphEnvironment -AppId yournewappid -AuthUrl "https://login.microsoftonline.com/yourTenantID"
This worked for me:
Created new APP reg with same permissions as "Microsoft Intune PowerShell" application. Added Authentication platform of type Mobile and desktop application with Reply URL of urn:ietf:wg:oauth:2.0:oob.
Run:
Update-MSGraphEnvironment -AppId <new app ID> -AuthUrl https://login.microsoftonline.com/<tenantID>
Then connect-MSGraph -ForceInteractive and use you intune admin account.