Powershell with modern authentication

Copper Contributor
Could someone guide me how to use modern authentication in scripts making connections to exchange online/msonline/azuread. This is required for unattended powershell scripts which are configured with basic authentication at present.
3 Replies

There are plenty of samples available online or even here on the MTC, do a search. And prepare to make some compromises, as there are no perfect solutions to that issue presently...

@Vasil Michev Can you post some examples? My searches are finding nothing relevant.  Thanks.

One thing you can do is set up a Conditional Access for your scripting server (requires AAD P1 license I think).