nerdexam
Microsoft

DP-420 · Question #120

You have an Azure Cosmos DB account named account1. You have several apps that connect to account1 by using the account's secondary key. You then configure the apps to authenticate by using service…

The correct answer is B. disableLocalAuth. The 'disableLocalAuth' property, when set to true, disables all local/key-based authentication for the Cosmos DB account - including primary and secondary account keys and resource tokens. This forces all clients to authenticate exclusively via Azure Active Directory (Entra ID)…

Integrate an Azure Cosmos DB solution

Question

You have an Azure Cosmos DB account named account1. You have several apps that connect to account1 by using the account's secondary key. You then configure the apps to authenticate by using service principals. You need to ensure that account1 will only allow apps to connect by using an Azure AD identity. Which account property should you modify?

Options

  • AdisableKeyBasedMetadataWriteAccess
  • BdisableLocalAuth
  • CuserAssignedIdentities
  • DallowedOrigins

How the community answered

(20 responses)
  • A
    5% (1)
  • B
    90% (18)
  • C
    5% (1)

Explanation

The 'disableLocalAuth' property, when set to true, disables all local/key-based authentication for the Cosmos DB account - including primary and secondary account keys and resource tokens. This forces all clients to authenticate exclusively via Azure Active Directory (Entra ID) identities, such as service principals or managed identities. 'disableKeyBasedMetadataWriteAccess' only restricts write operations on metadata via keys (not all access). 'userAssignedIdentities' configures which managed identities are attached to the account. 'allowedOrigins' configures CORS settings.

Topics

#Cosmos DB Security#Authentication#Azure AD#Account Properties

Community Discussion

No community discussion yet for this question.

Full DP-420 Practice