An Azure communication platform for deploying applications across devices and platforms.
Hi SabariDev,
Although the Try Email feature works in the Azure portal with your verified custom domain, the 401 Denied by the resource provider error in your Spring Boot app using the Java sample suggests a problem with the ACS Email SDK setup, most likely due to an incorrect or expired connection string, the email service not being enabled on your ACS resource, a misconfigured verified domain, or missing permissions on the email access key.
- Make sure you're using the correct
Email Access Key connection string, not one for chat or voice.
Go to your Azure Communication Services resource -> Click on Keys -> Copy the Primary Connection String under the Email section.
The format should be like this endpoint=https://<your-resource-name>.communication.azure.com/;accesskey=<your-key>.
- Please check that
Email is enabledfor your ACS resource.
Go to your ACS resource in the Azure portal -> under Email (Preview), make sure the feature is enabled and configured -> confirm your custom domain is set as the default sender domain.
- Check that your
custom domainis verified, connected, and active with the correct DNS records (SPF, DKIM, CNAME) by going to your ACS resource, selectingEmail→Domains, and confirming the status isConnectedandVerified, and ensure theFromemail in your code exactly matches your verified domain. - Please check Resource Configuration
// Ensure you're using the correct endpoint format
EmailClient emailClient = new EmailClientBuilder()
.connectionString("your-email-specific-connection-string")
.buildClient();
Send an email using Azure Communication Services
Add custom verified email domains
Please accept as "Yes" if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues.
Let me know if you have any further Queries.