Skip to content

Commit 5a66be4

Browse files
committed
Merge branch 'main' of github.com:MicrosoftDocs/azure-ai-docs-pr into sdg-updates
2 parents 8675476 + b1cdb50 commit 5a66be4

File tree

5 files changed

+69
-20
lines changed

5 files changed

+69
-20
lines changed

articles/ai-foundry/openai/azure-government.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ In some cases, models are retired in Azure Governmen ahead of dates in the comme
6666

6767
<br>
6868

69-
### Deafault Model Versions
69+
### Default Model Versions
7070
In some cases, new model versions are designated as default in Azure Governmen ahead of dates in the commercial cloud. General information on model upgrades can be found at [Working with Azure OpenAI models](/azure/ai-foundry/openai/how-to/working-with-models?tabs=powershell&branch=main#model-deployment-upgrade-configuration)
7171

7272
The following shows default model differences in Azure Government.

articles/ai-foundry/reference/region-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Azure AI Foundry is currently available in the following Azure regions. You can
3838
- Quatar Central
3939
- South Africa North
4040
- South Central US
41+
- South East Asia
4142
- South India
4243
- Southeast Asia
4344
- Spain Central

articles/ai-services/speech-service/how-to-pronunciation-assessment.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,42 +90,44 @@ If your audio file exceeds 30 seconds, use continuous mode for processing. In co
9090

9191
::: zone pivot="programming-language-cpp"
9292

93-
If your audio file exceeds 30 seconds, use continuous mode for processing.
93+
If your audio file exceeds 30 seconds, use continuous mode for processing. In continuous mode, the `EnableMiscue` option is not supported. To obtain `Omission` and `Insertion` tags, you need to compare the recognized results with the reference text.
9494

9595
::: zone-end
9696

9797
::: zone pivot="programming-language-java"
9898

99-
If your audio file exceeds 30 seconds, use continuous mode for processing. The sample code for continuous mode can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/java/jre/console/language-learning/src/com/microsoft/cognitiveservices/speech/samples/console/SpeechRecognitionSamples.java) under the function `pronunciationAssessmentContinuousWithFile`.
99+
If your audio file exceeds 30 seconds, use continuous mode for processing. In continuous mode, the `EnableMiscue` option is not supported. To obtain `Omission` and `Insertion` tags, you need to compare the recognized results with the reference text. You can find a sample implementation for continuous mode on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/java/jre/console/language-learning/src/com/microsoft/cognitiveservices/speech/samples/console/SpeechRecognitionSamples.java) under the function `pronunciationAssessmentContinuousWithFile`.
100100

101101
::: zone-end
102102

103103
::: zone pivot="programming-language-python"
104104

105-
If your audio file exceeds 30 seconds, use continuous mode for processing. The sample code for continuous mode can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/python/console/language-learning/pronunciation_assessment.py) under the function `pronunciation_assessment_continuous_from_file`, or try the [Azure AI Speech Toolkit](https://marketplace.visualstudio.com/items?itemName=ms-azureaispeech.azure-ai-speech-toolkit).
105+
If your audio file exceeds 30 seconds, use continuous mode for processing. In continuous mode, the `EnableMiscue` option is not supported. To obtain `Omission` and `Insertion` tags, you need to compare the recognized results with the reference text. You can find a sample implementation for continuous mode on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/python/console/language-learning/pronunciation_assessment.py) under the function `pronunciation_assessment_continuous_from_file`, or try the [Azure AI Speech Toolkit](https://marketplace.visualstudio.com/items?itemName=ms-azureaispeech.azure-ai-speech-toolkit).
106106

107107
::: zone-end
108108

109109
::: zone pivot="programming-language-javascript"
110110

111-
If your audio file exceeds 30 seconds, use continuous mode for processing. The sample code for continuous mode can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/javascript/node/language-learning/pronunciationAssessmentContinue.js).
111+
If your audio file exceeds 30 seconds, use continuous mode for processing. In continuous mode, the `EnableMiscue` option is not supported. To obtain `Omission` and `Insertion` tags, you need to compare the recognized results with the reference text. You can find a sample implementation for continuous mode on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/javascript/node/language-learning/pronunciationAssessmentContinue.js).
112112

113113
::: zone-end
114114

115115
::: zone pivot="programming-language-objectivec"
116116

117-
If your audio file exceeds 30 seconds, use continuous mode for processing. The sample code for continuous mode can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/objective-c/ios/speech-samples/speech-samples/ViewController.m) under the function `pronunciationAssessFromFile`.
117+
If your audio file exceeds 30 seconds, use continuous mode for processing. In continuous mode, the `EnableMiscue` option is not supported. To obtain `Omission` and `Insertion` tags, you need to compare the recognized results with the reference text. You can find a sample implementation for continuous mode on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/objective-c/ios/speech-samples/speech-samples/ViewController.m) under the function `pronunciationAssessFromFile`.
118118

119119
::: zone-end
120120

121121
::: zone pivot="programming-language-swift"
122122

123-
If your audio file exceeds 30 seconds, use continuous mode for processing. The sample code for continuous mode can be found on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/swift/ios/language-learning/speech-samples/ViewController.swift) under the function `continuousPronunciationAssessment`.
123+
If your audio file exceeds 30 seconds, use continuous mode for processing. In continuous mode, the `EnableMiscue` option is not supported. To obtain `Omission` and `Insertion` tags, you need to compare the recognized results with the reference text. You can find a sample implementation for continuous mode on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/scenarios/swift/ios/language-learning/speech-samples/ViewController.swift) under the function `continuousPronunciationAssessment`.
124124

125125
::: zone-end
126126

127127
::: zone pivot="programming-language-go"
128128

129+
If your audio file exceeds 30 seconds, use continuous mode for processing. Please note that pronunciation assessment is not supported in the Speech SDK for Go. To enable this feature, select a different programming language for your solution.
130+
129131
::: zone-end
130132

131133

90 KB
Loading

articles/search/search-security-api-keys.md

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ ms.service: azure-ai-search
99
ms.custom:
1010
- ignite-2023
1111
ms.topic: how-to
12-
ms.date: 07/31/2025
12+
ms.date: 10/22/2025
1313
ms.update-cycle: 365-days
1414
#customer intent: I want to learn how to connect to Azure AI Search using API keys so that I can authenticate inbound requests to my search service.
1515
---
1616

1717
# Connect to Azure AI Search using keys
1818

19-
Azure AI Search supports both identity-based and key-based authentication for connections to your search service. An API key is a unique string composed of 52 randomly generated numbers and letters. In your source code, you can specify it in a request header, or as an [environment variable](/azure/ai-services/cognitive-services-environment-variables) or as an app setting in your project, and then reference the variable on the request.
19+
Azure AI Search supports both identity-based and key-based authentication for connections to your search service. An API key is a unique string composed of 52 randomly generated numbers and letters. In your source code, you can specify it in a request header, or as an [environment variable](/azure/ai-services/cognitive-services-environment-variables) or app setting in your project, and then reference the variable on the request.
2020

2121
> [!IMPORTANT]
2222
> When you create a search service, key-based authentication is the default, but it's not the most secure option. We recommend that you replace it with [role-based access](search-security-enable-roles.md).
@@ -45,18 +45,21 @@ Visually, there's no distinction between an admin key or query key. Both keys ar
4545
API keys are used for data plane (content) requests, such as creating or accessing an index or, any other request that's represented in the [Search REST APIs](/rest/api/searchservice/).
4646

4747
You can use either an API key or [Azure roles](search-security-rbac.md) for control plane (service) requests. When you use an API key:
48-
- Admin keys are used for creating, modifying, or deleting objects. Admin keys are also used to GET object definitions and system information.
48+
49+
- Admin keys are used for creating, modifying, or deleting objects. Admin keys are also used to GET object definitions and system information, such as [LIST Indexes](/rest/api/searchservice/indexes/list) or [GET Service Statistics](/rest/api/searchservice/get-service-statistics/get-service-statistics).
50+
4951
- Query keys are typically distributed to client applications that issue queries.
5052

5153
### [**REST API**](#tab/rest-use)
5254

53-
**How API keys are used in REST calls**:
54-
55-
Set an admin key in the request header. You can't pass admin keys on the URI or in the body of the request. Admin keys are used for create-read-update-delete operation and on requests issued to the search service itself, such as [LIST Indexes](/rest/api/searchservice/indexes/list) or [GET Service Statistics](/rest/api/searchservice/get-service-statistics/get-service-statistics).
55+
Set an admin key in the request header. You can't pass admin keys on the URI or in the body of the request.
5656

5757
Here's an example of admin API key usage on a create index request:
5858

5959
```http
60+
@baseUrl=https://my-demo-search-service.search.windows.net
61+
@adminApiKey=aaaabbbb-0000-cccc-1111-dddd2222eeee
62+
6063
### Create an index
6164
POST {{baseUrl}}/indexes?api-version=2025-09-01 HTTP/1.1
6265
Content-Type: application/json
@@ -71,7 +74,7 @@ POST {{baseUrl}}/indexes?api-version=2025-09-01 HTTP/1.1
7174
}
7275
```
7376

74-
Set a query key in a request header for POST, or on the URI for GET. Query keys are used for operations that target the `index/docs` collection: [Search Documents](/rest/api/searchservice/documents/search-get), [Autocomplete](/rest/api/searchservice/documents/autocomplete-get), [Suggest](/rest/api/searchservice/documents/suggest-get), or [GET Document](/rest/api/searchservice/documents/get).
77+
Set a query key in a request header for POST, or on the URI for GET. Query keys are used for operations that target the `index/docs` collection: [Search Documents](/rest/api/searchservice/documents/search-get), [Autocomplete](/rest/api/searchservice/documents/autocomplete-get), [Suggest](/rest/api/searchservice/documents/suggest-get), or [GET Document](/rest/api/searchservice/documents/get).
7578

7679
Here's an example of query API key usage on a Search Documents (GET) request:
7780

@@ -83,26 +86,69 @@ GET /indexes/my-new-index/docs?search=*&api-version=2025-09-01&api-key={{queryAp
8386
> [!NOTE]
8487
> It's considered a poor security practice to pass sensitive data such as an `api-key` in the request URI. For this reason, Azure AI Search only accepts a query key as an `api-key` in the query string. As a general rule, we recommend passing your `api-key` as a request header.
8588
86-
### [**PowerShell**](#tab/azure-ps-use)
89+
### [**Python**](#tab/python-use)
90+
91+
It's a best practice to set the API key as an environment variable, but for simplicity, this example shows it as a string. The example uses a query API key for a query operation.
92+
93+
```python
94+
# Import libraries
95+
from azure.core.credentials import AzureKeyCredential
96+
from azure.identity import DefaultAzureCredential, AzureAuthorityHosts
97+
98+
# Variables for endpoint, keys, index
99+
search_endpoint: str = "https://<Put your search service NAME here>.search.windows.net/"
100+
credential = AzureKeyCredential("Your search service query key")
101+
index_name: str = "hotels-quickstart-python"
102+
103+
# Set up the client
104+
search_client = SearchClient(endpoint=search_endpoint,
105+
index_name=index_name,
106+
credential=credential)
107+
108+
# Run the query
109+
results = search_client.search(query_type='simple',
110+
search_text="*" ,
111+
select='HotelName,Description,Tags',
112+
include_total_count=True)
113+
114+
print ('Total Documents Matching Query:', results.get_count())
115+
for result in results:
116+
print(result["@search.score"])
117+
print(result["HotelName"])
118+
print(result["Tags"])
119+
print(f"Description: {result['Description']}")
120+
```
87121

88-
**How API keys are used in PowerShell**:
122+
### [**PowerShell**](#tab/azure-ps-use)
89123

90124
Set API keys in the request header using the following syntax:
91125

92-
```azurepowershell
126+
```powershell
93127
$headers = @{
94128
'api-key' = '<YOUR-ADMIN-OR-QUERY-API-KEY>'
95129
'Content-Type' = 'application/json'
96130
'Accept' = 'application/json' }
97131
```
98132

99-
A script example showing API key usage for various operations can be found at [Quickstart: Create an Azure AI Search index in PowerShell using REST APIs](search-get-started-text.md).
133+
Use a variable to contain the fully qualified query:
134+
135+
```powershell
136+
$url = '<YOUR-SEARCH-SERVICE>/indexes/hotels-quickstart/docs?api-version=2025-09-01&search=attached restaurant&searchFields=Description,Tags&$select=HotelId,HotelName,Tags,Description&$count=true'
137+
```
138+
139+
Send the request to the search service:
140+
141+
```powershell
142+
Invoke-RestMethod -Uri $url -Headers $headers | ConvertTo-Json
143+
```
144+
145+
More script examples for other operations can be found at [Quickstart: Create an Azure AI Search index in PowerShell using REST APIs](search-get-started-text.md).
100146

101147
### [**Portal**](#tab/portal-use)
102148

103-
**How API keys are used in the Azure portal**:
149+
Recall that key authentication is enabled by default and supports data plane operations such as indexing and queries.
104150

105-
Key authentication applies to data plane operations such as indexing and queries. It's enabled by default. However, if you [disable API keys](search-security-enable-roles.md#disable-api-key-authentication) and set up role assignments, the Azure portal uses role assignments instead.
151+
However, if you [disable API keys](search-security-enable-roles.md#disable-api-key-authentication) and set up role assignments, the Azure portal uses role assignments instead.
106152

107153
---
108154

0 commit comments

Comments
 (0)