hiexam
microsoft · AZ-204 · Q708 · code_completion · ms_graph, web_app, auth_code

HOTSPOT - You are developing a web application that makes calls to the Microsoft Graph API. You register the applicati…

HOTSPOT - You are developing a web application that makes calls to the Microsoft Graph API. You register the application in the Azure portal and upload a valid X509 certificate. You create an appsettings.json file containing the certificate name, client identifier for the application, and the tenant identifier of the Microsoft Entra ID. You create a method named ReadCertificate to return the X509 certificate by name. You need to implement code that acquires a token by using the certificate. How should you complete the code segment? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. //IMG//
config = json.load(open(sys.argv[1]))
app = msal.{{dropdown1}}(
    config["client_id"], authority=config["authority"],
    client_credential={"thumbprint": config["thumbprint"], "private_key": open(config["private_key_file"].read())}
)
result = None

scopes = config["scope"]
result = app.acquire_token_silent({{dropdown2}}, account=None)
Correct slot values

Answer hidden

Unlock AZ-204

First 5 questions of every exam are free. Unlock the rest.

Includes
  • · All — questions
  • · Verified answers + AI explanations
  • · Spaced-repetition mistake notebook
  • · Phone, tablet, laptop sync

One-time payment. Doesn't auto-renew. · Already paid? Sign in