Connect to and consume Azure services and third-party services →mediumMultiple ChoiceObjective-mapped
AZ-204 Practice Question: Connect to and consume Azure services and third-party services
You are developing a .NET Core web application that needs to send an email notification when a user registers. You decide to use Azure Communication Services Email. Which authentication method should you use to securely connect from your application to Azure Communication Services?
⚠ Common exam trap
Watch out — candidates often confuse Azure Communication Services with other Azure services (like Storage or Event Hubs) that support connection strings or managed identities, and incorrectly assume those authentication methods apply to ACS Email.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use an endpoint and an access key from Azure Communication Services.
Azure Communication Services Email requires authentication via an endpoint URL and an access key, which are provisioned in the ACS resource. This is the primary method for programmatic access, as the access key is used to sign HTTP requests (via HMAC-SHA256) to the ACS Email API. Option B correctly identifies this combination as the secure authentication mechanism.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use an Azure AD service principal with client secret.
Why it's wrong here
Microsoft Entra ID service principal with client secret authenticates to Azure Resource Manager for control-plane operations, but Azure Communication Services Email requires a managed identity or access key for data-plane requests to send emails. This option tempts because service principals are commonly used for secure application authentication to Azure APIs, and they would be correct for managing Communication Services resources via ARM, not for sending emails themselves.
- ✓
Use an endpoint and an access key from Azure Communication Services.
Why this is correct
This option correctly identifies the standard authentication method for a .NET Core web application to interact with Azure Communication Services for data-plane operations, such as sending emails. The endpoint specifies the unique service URL for the Communication Services resource, while the access key provides cryptographic proof of identity. Together, these credentials grant the application full administrative access to perform operations on the resource, making it the primary and most direct way to authenticate when a managed identity is not applicable or available.
- ✗
Use a connection string from the Azure portal.
Why it's wrong here
Azure Communication Services does not rely on a single connection string for authenticating data-plane operations, unlike some other Azure services such as Azure Storage or Azure Service Bus. While connection strings bundle multiple configuration parameters, Azure Communication Services explicitly requires separate values for its service endpoint and an access key. Attempting to use a connection string format would lead to authentication errors because the SDK expects distinct authentication parameters rather than a combined string.
- ✗
Use a managed identity for Azure resources.
Why it's wrong here
Managed identities are assigned to Azure resources, providing an identity for *that resource* to authenticate to other Azure services without managing credentials. A standalone .NET Core web application, especially during local development or if hosted outside Azure, does not inherently possess an Azure managed identity. This option is tempting because managed identities are the recommended, secure approach for Azure-hosted applications (e.g., an App Service) to access other Azure services, eliminating the need for secret management.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.