Skip to content

Commit 4c647c8

Browse files
committed
add disable local auth doc
1 parent 3dd3332 commit 4c647c8

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

articles/ai-services/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
href: security-features.md
8080
- name: Authenticate requests
8181
href: authentication.md
82+
- name: Disable local authentication
83+
href: disable-local-authentication.md
8284
- name: Rotate keys
8385
href: rotate-keys.md
8486
- name: Use environment variables

articles/ai-services/authentication.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ In the previous sections, we showed you how to authenticate against Azure AI ser
169169

170170
In the following sections, you'll use either the Azure Cloud Shell environment or the Azure CLI to create a subdomain, assign roles, and obtain a bearer token to call the Azure AI services. If you get stuck, links are provided in each section with all available options for each command in Azure Cloud Shell/Azure CLI.
171171

172+
> [!IMPORTANT]
173+
> If your organization is doing authentication through Azure AD, you should [disable local authentication](./disable-local-auth.md) (authentication with keys) so that users in the organization must always use Azure AD.
174+
172175
### Create a resource with a custom subdomain
173176

174177
The first step is to create a custom subdomain. If you want to use an existing Azure AI services resource which does not have custom subdomain name, follow the instructions in [Azure AI services custom subdomains](../articles/cognitive-services/cognitive-services-custom-subdomains.md#how-does-this-impact-existing-resources) to enable custom subdomain for your resource.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Disable local authentication in Azure AI Services
3+
titleSuffix: Azure AI services
4+
description: "This article describes disabling local authentication in Azure AI Services."
5+
services: cognitive-services
6+
author: PatrickFarley
7+
manager: nitinme
8+
ms.service: cognitive-services
9+
ms.topic: how-to
10+
ms.date: 09/22/2023
11+
ms.author: pafarley
12+
---
13+
14+
# Disable local authentication in Azure AI Services
15+
16+
Azure AI Services provides Azure Active Directory (Azure AD) authentication support for all resources. This gives organizations control to disable local authentication methods and enforce Azure AD authentication. This feature provides you with seamless integration when you require centralized control and management of identities and resource credentials.
17+
18+
Azure AI Services provides an optional feature to "Disable local authentication" using the Azure policy [Cognitive Services accounts should have local authentication methods disabled](https://ms.portal.azure.com/#view/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2F71ef260a-8f18-47b7-abcb-62d0673d94dc). You can set it at the subscription level or resource group level to enforce the policy for a group of services.
19+
20+
Disabling local authentication doesn't take effect immediately. Allow a few minutes for the service to block future authentication requests.
21+
22+
You can use PowerShell to determine whether the local authentication policy is enabled. First sign in with the `Connect-AzAccount` command. Then use the cmdlet **[Get-AzCognitiveServicesAccount](/powershell/module/az.cognitiveservices/get-azcognitiveservicesaccount)** to retrieve your resource, and check the property `DisableLocalAuth`. A value of `true` means local authentication is disabled.
23+
24+
25+
## Re-enable local authentication
26+
27+
To enable local authentication, execute the PowerShell cmdlet **[Set-AzCognitiveServicesAccount](/powershell/module/az.cognitiveservices/set-azcognitiveservicesaccount)** with the parameter `-DisableLocalAuth false`.  Allow a few minutes for the service to accept the change to allow local authentication requests.
28+
29+
## Next steps
30+
- [Authenticate requests to Azure AI services](./authentication.md)

0 commit comments

Comments
 (0)