Free Microsoft Azure AI-102 Actual Exam Questions - Question 9 Discussion

Question No. 9

HOTSPOT You have an Azure subscription that contains an Azure Al Content Safety resource named CS1. You need to use the SDK to call CS1 to identify requests that contain harmful content. How should you complete the code? lo answer, select the appropriate options m the answer area. NOTE: Each correct selection is worth one point AI-102 practice exam questions

US
MM
Mason M.
2026-02-19

I’m thinking A for the credential part because typically, Azure SDKs use an AzureKeyCredential object to handle the key securely, not just passing the key directly in client options. So even if B for the endpoint looks right, C might be the better call to actually provide the key properly. It matches what I’ve seen in other Azure AI SDKs where credentials are separated out from general client options.

0
DD
David D.
2026-01-31

I think option B for the endpoint is a safe bet since you need to specify the resource’s URL before making calls. For the key, D looks right because the SDK often requires the key as part of the client’s credentials or options. Options A and C don’t seem to fit typical SDK patterns where you set endpoint separately from credentials. Plus, the code snippet style points toward using B and D to correctly configure the client before calling the content safety method.

0
ET
Ethan T.
2026-01-17

Looks like setting endpoint first (B) then passing key in client options (D) makes sense here.

0
CA
Chris A.
2026-01-17

This one’s kinda tricky with those blanks. I went with setting the endpoint first, then using the key in the client options before making the content moderation call. But the naming feels a bit off compared to samples I’ve seen. Anyone else figure out what they put in those code gaps? Feels like a mix of different SDK versions or something.

0