Skip to content

Commit

Permalink
Fix variable in error log (#481)
Browse files Browse the repository at this point in the history
Fixes #480
  • Loading branch information
BetaLyte committed Apr 17, 2024
1 parent 02be0b1 commit b2d5b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smletsExchangeConnector.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4935,7 +4935,7 @@ else
#validate the Run As Account format to ensure it is an email address
if (!(($username + "@" + $domain) -match "^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"))
{
New-SMEXCOEvent -Source "General" -EventId 4 -LogMessage "The address/SCSM Run As Account used to sign into 365 is not a valid email address and is currently entered as $($username + "@" + $password). This will prevent a successful connection. To fix this, go to the Run As account in SCSM and for the username enter it as an email address like user@domain.tld" -Severity "Error"
New-SMEXCOEvent -Source "General" -EventId 4 -LogMessage "The address/SCSM Run As Account used to sign into 365 is not a valid email address and is currently entered as $($username + "@" + $domain). This will prevent a successful connection. To fix this, go to the Run As account in SCSM and for the username enter it as an email address like user@domain.tld" -Severity "Error"
}
#request an access token from Azure
$ReqTokenBody = @{
Expand Down

0 comments on commit b2d5b51

Please sign in to comment.