AI-901 practice question: Chat client apps with the Foundry SDK (1 of 4)
Implement AI solutions by using Microsoft Foundry A free question from our original AI-901 practice exam. Try it, then open the answer to see why each option is right or wrong.
A university computer science department is writing a Python script that connects to its Foundry project and sends prompts to a chat model. Each developer must sign in with their own Microsoft Entra identity.
Which class connects the script to the Foundry project?
Choose one answer.
AA. TextAnalyticsClient from the azure.ai.textanalytics package, which connects to a Language resource
BB. DefaultAzureCredential from the azure.identity package, which signs in with Microsoft Entra ID
CC. AIProjectClient from the azure.ai.projects package, given the project endpoint and a credential
DD. AzureKeyCredential from the azure.core package, which wraps a resource key
Show the answer and explanation
Answer: C
A. Wrong: TextAnalyticsClient connects to an Azure Language resource for text analysis. It is not the client for a Foundry project, so it cannot send chat prompts to project deployments.
B. Wrong: DefaultAzureCredential provides Microsoft Entra sign-in, and the script passes it to a client. On its own it does not connect the script to any Foundry project.
D. Wrong: AzureKeyCredential wraps a resource key for authentication. It only supplies a key, so it cannot connect the script to a project by itself.
Explanation
AIProjectClient is the class that connects code to a Foundry project, using the project endpoint and a credential. DefaultAzureCredential supplies the Entra sign-in but connects to nothing. The other two classes serve other tasks.
Want more on Chat client apps with the Foundry SDK? The 5 full-length practice sets have 20 more Chat client apps with the Foundry SDK questions, 225 in all, none of them in the free exam. One payment of $9.99 $6.99, no subscription. Get the practice sets →
✓ Every exam starts with free questions. No account needed.
Can we use Google Analytics cookies to see which pages help people? No ads, and we never sell data. Privacy