Hi there,
I would recommend using SPN instead of username\passwiord pair. An example below
https://lazyadmin.nl/powershell/azure-automation-authentication-and-runbooks/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
OLD METHOD: Currently we are using basic authentication to authenticate office 365 account as below(basic Auth):
NEW METHOD: so now we are trying to replace the above code with this code(Modern Auth)
in both the above case, the username and password are stored under a Credential Object under the Credential tab in azure automation account.
so from that credential object we are first getting the username and password. then using those credentials we are authenticating office 365 account.
so will the new method(using modern auth) still work even after the removal of basic auth by microsoft from 1 oct 2022?
Can we store the credentials in credential object and use it in modern auth as shown above? even after the removal of basic auth by microsoft from 1 oct 2022?
Hi there,
I would recommend using SPN instead of username\passwiord pair. An example below
https://lazyadmin.nl/powershell/azure-automation-authentication-and-runbooks/
Use a service principal to logon (with certificate), this is the way. Also check that you are running the latest module version of ExchangeOnlineManagement
Example:
Connect-ExchangeOnline -ShowBanner:$false -AppId $AzureConnection.ApplicationId -CertificateThumbprint $AzureConnection.CertificateThumbprint -Organization $ExchangeOrgName -ErrorAction Continue -ErrorVariable oErr
if ($oErr)
{
Write-Error -Message "Failed to connect to Exchange Online with organization name: $ExchangeOrgName" -ErrorAction Stop
}