Skip to content

Commit dbd24ac

Browse files
authored
Fix getting models from Azure Open AI resource if it is connected through Entra ID. (Azure#50992)
* Fix getting models from Azure Open AI resource if it is connected through Entra ID. * Fix changelog
1 parent 21c9415 commit dbd24ac

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

sdk/ai/Azure.AI.Projects/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Breaking Changes
88

99
### Bugs Fixed
10+
* Fix getting model deployed on the Azure Open AI resource, if the resource is authenticated using Entra ID. [see GitHub issue 49064](https://github.com/Azure/azure-sdk-for-net/issues/49064)
1011

1112
### Other Changes
1213

@@ -39,7 +40,7 @@ AI models deployed to the Project's AI Services.
3940
* New sample added for connected agent tool.
4041

4142
### Bugs Fixed
42-
* Fix for filtering of messages by run ID [see GitHub issue issue 49513](https://github.com/Azure/azure-sdk-for-net/issues/49513).
43+
* Fix for filtering of messages by run ID [see GitHub issue 49513](https://github.com/Azure/azure-sdk-for-net/issues/49513).
4344

4445
## 1.0.0-beta.7 (2025-04-18)
4546

sdk/ai/Azure.AI.Projects/src/Custom/Inference/Inference.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ private AzureOpenAIClient CreateAzureOpenAIClient(string? connectionName = null,
168168
string apiKey = apiKeyCreds.ApiKey;
169169
return new AzureOpenAIClient(new Uri(endpoint), new ApiKeyCredential(apiKey));
170170
}
171-
;
171+
else if (selectedConnection.Credentials is EntraIDCredentials)
172+
{
173+
return new AzureOpenAIClient(new Uri(endpoint), this._tokenCredential);
174+
}
172175
}
173176
ClientConnection connection = this.GetConnection(typeof(AzureOpenAIClient).FullName!);
174177

0 commit comments

Comments
 (0)