I want an application (e.g. application123) to write a mail on behalf of all users. For this purpose a user is configured within the application (e.g. myImpersoUser).
I want to realize this via ApplicationImpersonation, unfortunately it does not work yet. If I assign the "send_As" permission manually, it works (so SMTP and authentication on the part of the application seems to be ok).
Current setting:
- AD Security Group (universal) -> App_Mailsender (is a mail-enabled AD group, the same game already tested with a distribution list).
-Management Scope created, which refers to the AD group
New-ManagementScope -Name "S_Mailsend" -RecipientRestrictionFilter {MemberOfGroup -eq "CN=App_Mailsender,OU=X,OU=Y,DC=domainName,DC=local"}
-then RoleAsignment performed
New-ManagementRoleAssignment -Name: "R_Mailsend" -Role:ApplicationImpersonation -CustomRecipientWriteScope: "S_Mailsend" -User: "[email protected]"
Unfortunately I get the message "550 5.7.60 SMTP; Client does not have permissions to send as this sender".
Where is the error?