Courseiva

AZ-204 Practice Question: Connect to and consume Azure services and third-party services

You are building an Azure Logic App that needs to call an external API secured with OAuth 2.0 client credentials flow. You have registered an application in Microsoft Entra ID with client ID 'myClientId' and client secret stored in Key Vault. Which action should you use to authenticate?

⚠ Common exam trap

Watch out — candidates often confuse the 'Managed Identity' option (which works only for Azure resources that accept Microsoft Entra ID tokens directly) with the need to authenticate to an external third-party API, or they mistakenly look for a dedicated 'OAuth 2.0 connector' instead of using the HTTP action's built-in authentication type.

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

HTTP action with Active Directory OAuth authentication

The HTTP action in Azure Logic Apps supports an 'Active Directory OAuth' authentication type that directly implements the OAuth 2.0 client credentials flow. By providing the tenant ID, client ID, and referencing the client secret from Key Vault (via a secure parameter or connection reference), the Logic App can obtain an access token from Microsoft Entra ID and authenticate to the external API without custom code.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • HTTP action with Active Directory OAuth authentication

    Why this is correct

    The HTTP action in Azure Logic Apps provides robust, built-in support for various authentication types, including Active Directory OAuth. When configured, it handles the entire client credentials flow by using an Azure AD application registration's client ID and secret to acquire an access token from Microsoft Entra ID. This token is then automatically included in the Authorization header of the outgoing request to the external API, ensuring secure and compliant authentication without manual token management.

  • HTTP action with Managed Identity authentication

    Why it's wrong here

    Managed Identities are designed to provide Azure resources with an identity in Microsoft Entra ID, enabling them to authenticate to *other Azure services* that support Azure AD authentication, such as Azure Key Vault or Azure Storage. They are not intended for authenticating to generic *external APIs* that are not part of the Azure ecosystem and do not inherently understand or validate Managed Identity tokens. Consequently, an external API expecting a standard OAuth token from a specific app registration would reject a request authenticated via a Managed Identity.

  • Invoke the API through Azure API Management

    Why it's wrong here

    While technically possible to route API calls through Azure API Management, this approach introduces an unnecessary layer of complexity, additional cost, and latency for the sole purpose of calling an external API. API Management acts as a proxy and would still require its own configuration to handle the OAuth client credentials flow to the backend API, effectively shifting the authentication challenge rather than directly solving it within the Logic App's context. It does not simplify the core requirement of obtaining and managing an OAuth token.

  • Use the Microsoft Entra ID OAuth 2.0 connector

    Why it's wrong here

    There is no dedicated, standard 'Microsoft Entra ID OAuth 2.0 connector' within Azure Logic Apps specifically designed for calling external APIs that require OAuth 2.0 authentication. Logic Apps instead provides the highly flexible HTTP action, which includes comprehensive, built-in authentication settings to directly configure various OAuth 2.0 grant types, including client credentials, for seamless integration with external services. Relying on the HTTP action's native capabilities is the intended and most efficient method.

About these practice questions

This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.