Hello,
My powershell script in our Azure Automation account breaks at the very first line;
Connect-AzureAd : One or more errors occurred.: AADSTS53003: Access has been blocked by Conditional Access policies.
The access policy does not allow token issuance.
I'm successfully running scripts here that connect to Sharepoint, but connecting to Exchange and AAD fails with the error above.
I investigated the sign-in logs and found nothing of this. Code used to connect is:
$Credentials = Get-AutomationPSCredential -Name 'AzureAutomationUser'
Connect-AzureAd -Credential $Credentials
What to tweak in conditional access to make this work?