Microsoft Azure Developer Associate AZ-204 Practice Question

You are building an ASP.NET Core web app that authenticates to a service by using a client certificate. The certificate is stored in an Azure Key Vault named ContosoVault and was imported as an exportable PFX file. At start-up you must load the certificate with its private key into an X509Certificate2 object in memory. A DefaultAzureCredential instance named credential is already available. Which C# approach should you implement?

  • Instantiate a CertificateClient, call GetCertificateAsync("clientCert"), and pass the returned Certificate.Content bytes to the X509Certificate2 constructor.

  • Instantiate a SecretClient with the vault URI and credential, call GetSecretAsync("clientCert"), convert the Value to byte[], then create the X509Certificate2 object from the byte array.

  • Use Azure CLI inside the app to run az keyvault certificate download and load the downloaded file into an X509Certificate2 object.

  • Instantiate a KeyClient, call GetKeyAsync("clientCert"), extract the key material, and build the X509Certificate2 object from it.

Microsoft Azure Developer Associate AZ-204
Implement Azure security
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot