Skip to content

Commit c13f481

Browse files
authored
Add overview for API key authentication in Foundry
This document provides an overview of API key authentication in Azure AI Foundry projects, detailing the default settings and steps to manage API keys.
1 parent b4794e5 commit c13f481

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# API Key Authentication in Azure AI Foundry Projects - Overview
2+
3+
Costa Rica
4+
5+
[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/)
6+
[brown9804](https://github.com/brown9804)
7+
8+
Last updated: 2025-07-17
9+
10+
------------------------------------------
11+
12+
13+
> [!IMPORTANT]
14+
> If you’ve tried the update with the correct resource ID and API version, and the property still reads "disableLocalAuth": true, that means the setting is enforced by default in your subscription or tenant.
15+
> `This behavior is a platform level security enhancement by Microsoft. Local authentication (API keys) is disabled by default in many tenants, and you cannot override it with CLI or REST API. Even subscription owners and tenant admins will continue to see "disableLocalAuth": true unless the organization explicitly opts out, which is rare.`
16+
> The only `supported path forward is to use Microsoft Entra ID authentication for your Foundry projects.` [Microsoft Entra Agent ID](https://learn.microsoft.com/en-us/entra/agent-id/identity-professional/security-for-ai#microsoft-entra-agent-id)
17+
18+
<details>
19+
<summary><b>List of References</b> (Click to expand)</summary>
20+
21+
- [Security for AI agents with Microsoft Entra Agent ID](https://learn.microsoft.com/en-us/entra/agent-id/identity-professional/security-for-ai#microsoft-entra-agent-id)
22+
- [Security for Foundry Tools](https://learn.microsoft.com/en-us/azure/ai-services/security-features)
23+
- [Disable local authentication in Foundry Tools](https://learn.microsoft.com/en-us/azure/ai-services/disable-local-auth?utm_source=copilot.com)
24+
- [Authentication and authorization in Microsoft Foundry](https://learn.microsoft.com/en-us/azure/ai-foundry/concepts/authentication-authorization-foundry?view=foundry-classic&utm_source=copilot.com)
25+
- [Microsoft Ignite - BOOK OF NEWS November 18 - 21, 2025](https://news.microsoft.com/ignite-2025-book-of-news/?msockid=1d5e87de30816a213ee0911931bf6b3b)
26+
- [Foundry Control Plane: Where Developers Build, Operate, and Govern Every Agent](https://techcommunity.microsoft.com/blog/azure-ai-foundry-blog/foundry-control-plane-where-developers-build-operate-and-govern-every-agent/4467885)
27+
- [Control user access to agents](https://learn.microsoft.com/en-us/entra/agent-id/identity-professional/control-user-access-agents)
28+
- [What is Microsoft Entra Agent ID?](https://learn.microsoft.com/en-us/entra/agent-id/identity-professional/microsoft-entra-agent-identities-for-ai-agents)
29+
30+
<img width="916" height="558" alt="image" src="https://github.com/user-attachments/assets/de44264b-2b81-4a05-af1d-cc6ffab56a8b" />
31+
32+
- [What's new at Microsoft Ignite 2025 - Microsoft Entra](https://learn.microsoft.com/en-us/entra/fundamentals/whats-new-ignite-2025?utm_source=copilot.com)
33+
34+
</details>
35+
36+
> In new Azure AI Foundry projects, API key authentication is disabled by default because the resource property `disableLocalAuth` is set to **true**. This prevents listing or generating keys and forces authentication through Microsoft Entra ID (Azure AD).
37+
38+
<img width="1906" height="830" alt="image" src="https://github.com/user-attachments/assets/1cb23e16-930d-4984-ba61-15578438142d" />
39+
40+
<img width="1900" height="821" alt="image" src="https://github.com/user-attachments/assets/7f96a526-8d04-495a-85b0-bf3642516120" />
41+
42+
> [!NOTE]
43+
> If re‑enable API keys is allowed, you must update the backing **Cognitive Services account** configuration at the Azure resource level (via Azure CLI, ARM template, or REST API) by setting `disableLocalAuth=false`. Once updated, API keys can be managed under **Keys and Endpoints** in the Azure portal.
44+
45+
<img width="1906" height="828" alt="image" src="https://github.com/user-attachments/assets/3852b6c7-f843-414f-8c9d-98f5d466008d" />
46+
47+
1. Run this command in the CLI to see the properties first:
48+
49+
```cli
50+
az resource show \
51+
--ids "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<ACCOUNT_NAME>" \
52+
--query properties \
53+
--output json
54+
```
55+
56+
> E.g
57+
58+
<img width="1899" height="820" alt="image" src="https://github.com/user-attachments/assets/779d0d85-c8a1-42b1-a599-a2f65468683d" />
59+
60+
2. If your tenant allows you to change it, you can re‑enable API key authentication by setting the property to `false`:
61+
62+
```cli
63+
az resource update \
64+
--ids "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.CognitiveServices/accounts/<ACCOUNT_NAME>" \
65+
--set properties.disableLocalAuth=false \
66+
--api-version 2023-05-01 \
67+
--debug
68+
```
69+
70+
> E.g
71+
<img width="1914" height="325" alt="image" src="https://github.com/user-attachments/assets/e3628b8f-d5dc-45ee-813a-9f248cf533f8" />
72+
73+
74+
<!-- START BADGE -->
75+
<div align="center">
76+
<img src="https://img.shields.io/badge/Total%20views-1633-limegreen" alt="Total views">
77+
<p>Refresh Date: 2025-12-03</p>
78+
</div>
79+
<!-- END BADGE -->

0 commit comments

Comments
 (0)