nerdexam
Microsoft

AI-102 · Question #482

You have a Microsoft Azure AI Foundry project named Project1. You plan to create an app named App1 that will connect to Project1 and chat by using a generative AI model. You need to connect App1 to…

The correct answer is A. a connection string. To minimize development effort when using the Azure AI Foundry SDK, you should configure the AIProjectClient object using the project connection string. This approach is highly efficient because the connection string is a single string that encapsulates multiple required…

Submitted by rohit_dlh· Mar 30, 2026Implement generative AI solutions

Question

You have a Microsoft Azure AI Foundry project named Project1. You plan to create an app named App1 that will connect to Project1 and chat by using a generative AI model. You need to connect App1 to Project1 by using the Azure AI Foundry SDK. The solution must minimize development effort. What should you configure in App1?

Options

  • Aa connection string
  • Ba SASCredentials object
  • Can AIProjectClient object
  • Da project scope key

How the community answered

(24 responses)
  • A
    71% (17)
  • B
    8% (2)
  • C
    4% (1)
  • D
    17% (4)

Explanation

To minimize development effort when using the Azure AI Foundry SDK, you should configure the AIProjectClient object using the project connection string. This approach is highly efficient because the connection string is a single string that encapsulates multiple required parameters--such as the subscription ID, resource group name, and project name--allowing the client to initialize and authenticate with minimal code. How to Configure the AIProjectClient 1. Retrieve Connection String: In the Azure AI Foundry portal, go to the Overview page of your project. Under Project details, copy the Project connection string. 2. Initialize the Client: Use the from_connection_string method (or equivalent initialization depending on SDK version) to create the client. Minimal Code Example (Python) from azure.ai.projects import AIProjectClient from azure.identity import DefaultAzureCredential # Load the connection string from an environment variable for security conn_str = os.environ["PROJECT_CONNECTION_STRING"] # Load the connection string from an environment variable for security conn_str = os.environ["PROJECT_CONNECTION_STRING"] https://workshop.aifoundry.app/1-introduction/3-quick_start

Topics

#Azure AI Foundry#SDK connectivity#Connection strings

Community Discussion

No community discussion yet for this question.

Full AI-102 Practice