Forum Discussion

matkopajko's avatar
matkopajko
Copper Contributor
Nov 11, 2025

Azure AI foundry projects

Hello,

my use case: I need to be able to call my agent, which I created inside my azure ai foundry project. 

I have API route and also some API key, and the most crucial thing - agent id.

Now, can someone explain to me, why all the documentation is telling me that I need some sort of authorization. I have already tried it and it is working. Now I am trying to think about something else. How to use this agent in some production ready apps? I am not able to create accounts for everybody who try to call my service. How this can be done ?

1 Reply

  • sannavajjala's avatar
    sannavajjala
    Copper Contributor
    Hi,
     
    You’re absolutely right, calling your Azure AI Foundry agent directly works fine using the project endpoint and API key. 
    The documentation emphasizes “authorization” because Azure supports two modes: API key based access for inference and Entra ID based access for management and enterprise controls.
     
     For production, you wouldn’t expose your Foundry key to end users, instead, have your backend or API Management layer call the Foundry endpoint securely using either a Managed Identity or a stored API key in Key Vault. Your users then authenticate only to your app, while your backend communicates with the agent on their behalf this keeps things secure, scalable, and compliant. Hope this helps, I am available to assist if needed more information on this.

Resources