<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d" -->

---
title: Jaliya's Blog: Using Azure AI Foundry resource for .NET...
description: Migrating .NET TextAnalyticsClient and TextTranslationClient from separate Azure AI Language and Translator resources to a single consolidated Azure AI Foundry...
canonical: https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Jaliya's Blog: Using Azure AI Foundry resource for .NET Azure.AI.TextAnalytics and Azure.AI.Translation.Text Clients | daily.dev
og:description: Migrating .NET TextAnalyticsClient and TextTranslationClient from separate Azure AI Language and Translator resources to a single consolidated Azure AI Foundry...
og:url: https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d
og:image: https://api.daily.dev/og/posts/g4dxzM18d.png
og:image:alt: Jaliya's Blog: Using Azure AI Foundry resource for .NET Azure.AI.TextAnalytics and Azure.AI.Translation.Text Clients
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Jaliya's Blog: Using Azure AI Foundry resource for .NET Azure.AI.TextAnalytics and Azure.AI.Translation.Text Clients

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 3 min read · 0 upvotes · 0 comments

## Summary

Migrating .NET TextAnalyticsClient and TextTranslationClient from separate Azure AI Language and Translator resources to a single consolidated Azure AI Foundry (multi-service AIServices) endpoint causes TextTranslationClient to fail with a 404 Resource Not Found, while TextAnalyticsClient works fine. The root cause traces to Azure.AI.Translation.Text SDK's UriExtensions.IsPlatformHost check, which looks for the substring 'cognitiveservices' in the host to decide whether to append the '/translator/text' path prefix. Since the new Foundry endpoint uses 'services.ai.azure.com' instead of 'cognitiveservices.azure.com', the SDK skips the prefix and posts to the wrong path. The workaround is to manually append '/translator/text' to the endpoint URI when constructing TextTranslationClient. A related GitHub issue on azure-sdk-for-net (#61912) tracks the behavior for a possible fix.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://jaliyaudagedara.blogspot.com/2026/08/using-azure-ai-foundry-resource-for-net.html>

## Questions this post answers

### Why does TextTranslationClient throw a 404 Resource Not Found error when pointed at an Azure AI Foundry endpoint?

The Azure.AI.Translation.Text SDK only appends the required '/translator/text' path prefix when the endpoint host contains the string 'cognitiveservices'. Azure AI Foundry's multi-service endpoint uses the host 'services.ai.azure.com' instead, so the SDK's IsPlatformHost check fails, no prefix is added, and the client posts to '/translate' instead of '/translator/text/translate', producing a 404.

_Developers wiring up Azure AI Foundry clients can track SDK quirks like this via daily.dev before they hit production._

### How do I fix the 404 error from TextTranslationClient when using an Azure AI Foundry services.ai.azure.com endpoint in .NET?

Manually append '/translator/text' to the endpoint URI when constructing the client, for example new TextTranslationClient(credentials, new Uri($"{apiEndpoint}/translator/text")). Because the SDK's PLATFORM_PATH constant is a rooted path, new Uri(endpoint, PLATFORM_PATH) replaces rather than duplicates the path, so adding the suffix yourself is safe even if the SDK's internal detection is later fixed.

_Anyone patching around Azure SDK path quirks can follow related fixes and issues on daily.dev._

### Why does Azure.AI.TextAnalyticsClient work fine on an Azure AI Foundry endpoint while TextTranslationClient fails?

TextAnalyticsClient does not rely on a host-based check to append a route prefix, so it works correctly against the services.ai.azure.com Foundry endpoint. TextTranslationClient, however, only adds its required '/translator/text' path when the endpoint host contains 'cognitiveservices', a check that fails for Foundry's different hostname, causing requests to hit the wrong path and return 404.

_Teams consolidating Azure AI resources can compare SDK client quirks like this on daily.dev before migrating._

## Similar posts on daily.dev

- [Jaliya's Blog: Microsoft Agent Framework: Hosted Agents in Microsoft Foundry with .NET](https://daily.dev/posts/jaliya-s-blog-microsoft-agent-framework-hosted-agents-in-microsoft-foundry-with-net-dqon0i46y) · We Are .NET · 1 upvotes · 0 comments
- [Add Azure OpenAI and Foundry models to OpenCode](https://daily.dev/posts/add-azure-openai-and-foundry-models-to-opencode-loyzlbaj4) · We Are .NET · 1 upvotes · 0 comments
- [Building AI apps and agents with Microsoft Foundry](https://daily.dev/posts/building-ai-apps-and-agents-with-microsoft-foundry-tdq7h47dl) · InfoWorld · 0 upvotes · 0 comments

---

Tags: [#azure](https://daily.dev/tags/azure), [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Jaliya's Blog: Using Azure AI Foundry resource for .NET Azure.AI.TextAnalytics and Azure.AI.Translation.Text Clients","url":"https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d"},"datePublished":"2026-08-13T19:17:56.258Z","dateModified":"2026-08-13T19:30:52.816Z","description":"Migrating .NET TextAnalyticsClient and TextTranslationClient from separate Azure AI Language and Translator resources to a single consolidated Azure AI Foundry...","image":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","thumbnailUrl":"https://media.daily.dev/image/upload/s--qPvKM23u--/f_auto/v1722860399/public/Placeholder%2009","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"azure,.net,c#","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"Jaliya's Blog: Using Azure AI Foundry resource for .NET Azure.AI.TextAnalytics and Azure.AI.Translation.Text Clients"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/jaliya-s-blog-using-azure-ai-foundry-resource-for-net-azure-ai-textanalytics-and-azure-ai-translat-g4dxzm18d#faq","mainEntity":[{"@type":"Question","name":"Why does TextTranslationClient throw a 404 Resource Not Found error when pointed at an Azure AI Foundry endpoint?","acceptedAnswer":{"@type":"Answer","text":"The Azure.AI.Translation.Text SDK only appends the required '/translator/text' path prefix when the endpoint host contains the string 'cognitiveservices'. Azure AI Foundry's multi-service endpoint uses the host 'services.ai.azure.com' instead, so the SDK's IsPlatformHost check fails, no prefix is added, and the client posts to '/translate' instead of '/translator/text/translate', producing a 404. Developers wiring up Azure AI Foundry clients can track SDK quirks like this via daily.dev before they hit production."}},{"@type":"Question","name":"How do I fix the 404 error from TextTranslationClient when using an Azure AI Foundry services.ai.azure.com endpoint in .NET?","acceptedAnswer":{"@type":"Answer","text":"Manually append '/translator/text' to the endpoint URI when constructing the client, for example new TextTranslationClient(credentials, new Uri($\"{apiEndpoint}/translator/text\")). Because the SDK's PLATFORM_PATH constant is a rooted path, new Uri(endpoint, PLATFORM_PATH) replaces rather than duplicates the path, so adding the suffix yourself is safe even if the SDK's internal detection is later fixed. Anyone patching around Azure SDK path quirks can follow related fixes and issues on daily.dev."}},{"@type":"Question","name":"Why does Azure.AI.TextAnalyticsClient work fine on an Azure AI Foundry endpoint while TextTranslationClient fails?","acceptedAnswer":{"@type":"Answer","text":"TextAnalyticsClient does not rely on a host-based check to append a route prefix, so it works correctly against the services.ai.azure.com Foundry endpoint. TextTranslationClient, however, only adds its required '/translator/text' path when the endpoint host contains 'cognitiveservices', a check that fails for Foundry's different hostname, causing requests to hit the wrong path and return 404. Teams consolidating Azure AI resources can compare SDK client quirks like this on daily.dev before migrating."}}]}
```

