Search code examples
azureartificial-intelligencetranslationfoundry

Key invalid or doesn't use the region provided, but credentials are all correct. Azure AI Custom Translator


So we have an Azure AI Translator instance running.

But when I try to create a workspace for it in the Custom Translation Portal I get this error:

The key is either invalid or doesn't use the region provided. Please verify your key and region in the Azure portal then try again.

The key and the location are guaranteed correct. Both copy/pasted.

The thing is it's the Translator instance of a customer who does have a lot of things locked down. But we can't figure out what it is that has an impact on if an API key from a service isn't working.

However: this is most likely the culprit. On AI Translator/Networking/Firewall Allow access: Disabled

and in Private Endpoint connection the connection is in an approved state.

I'm guessing it's the fact that we have a private endpoint but- how can I access that when I am only able to add a key/location in a workspace?

Hope someone knows, thanks!


Solution

  • AI Translator/Networking/Firewall Allow access: Disabled might be the issue. Probably need to be configured as Selected Networks and Private Endpoints.

    enter image description here

    refer to this link's Use the Custom Translator portal section: https://learn.microsoft.com/en-us/azure/ai-services/translator/custom-translator/how-to/enable-vnet-service-endpoint

    If you configure Selected Networks and Private Endpoints via the Networking → Firewalls and virtual networks tab, you can't use the Custom Translator portal to create workspaces to train and publish models. However, you can still use the Translator resource with Custom Translator non-interactive REST API to build and publish custom models.

    also check the service endpoint is correctly configured and includes Microsoft.CognitiveServices.