Bypass being forced to enter your credentials

– Excuse my limited knowledge of Intune –

I’ve found many useful PowerShell scripts online one of which will force clients to run an Intune Sync. So instead of waiting every 8 hours you can make each client wake up and check in. But this, and many, many other scripts require you to connect to Intune first. A common set of commands I’ve seen are these.

Install-Module -Name Microsoft.Graph.Intune
Import-Module -Name Microsoft.Graph.Intune
Connect-MSGraph -AdminConsent

Is there anyway to run your .PS1 scripts locally and not have to force the users to enter their Intune credentials? I’d like to setup a few Scheduled Tasks that run different scripts, all of which require authentication with Intune.

I guess I’m still stuck in “on prem thinking” I log into my Domain and once authenticated I can use everything I need to use without having to reenter my credentials.

Thank you.

App Registration with certificate-based authentication:

this seems to be a paid service. I followed the link you provided and I don’t see the exact same options but I am asked if I want to try a free trial or buy this service.

Thank you.

You need an Azure AD subscription, but you must have that already if you’re using Intune?

Yes, I Azure/Intune up and running. I can run autopilot etc… But the identity area is not available. I get a prompt asking if I want a trial or if I want to buy it.