Microsoft Translator Plug in Error "The request is not authorized because the credentials are missing or invalid."

Hi,

We recently upgraded to Trados Studio 2022 SR2 - 17.2.10.19084
I installed the Microsoft Translator Provider 1.1.5.0 version. I am able to pull translations just fine using the Microsoft plugin for smaller files. For bigger files, we received this error. "The request is not authorized because credentials are missing or invalid". I'm sure that our credentials are working properly as I am able to pull translations for smaller files and call the API directly outside Studio. 

Screenshot of an 'Unexpected error' dialog box with a message stating 'An unexpected error occurred. The error was logged at C:UsersewislAppDataRoamingTrados AppStoreMicrosoftTranslatorProvider. The request is not authorized because credentials are missing or invalid.' with an 'OK' button.

I regenerate a new key from MS Azure, it tooks a few minutes and it is completely random but the message appeared again. Everything is fine for 30-45 minutes and sometimes 1 hour and then it comes back later. I restart everything and no error for a few minutes and then suddenly it starts again.
The language set I am using French(Canada) - English(Canada), see my Settings :
Screenshot of Microsoft Translator Provider settings with API key entered, 'Remember key' checked, 'Region' set to 'None', and 'Language Pair' set to 'French (Canada) - English (Canada)'.
I let Region option at "None", because neither "Canada" nor "Canada Central, Canada East" is functional, we received this : 
Error message dialog box stating 'Unexpected error. The error was logged at C:Users...AppDataRoamingTrados AppStoreMicrosoftTranslatorProvider. An error occurred while sending the request.'
Could you please help, my testing is blocked.

Regards

Belkacem



Generated Image Alt-Text
[edited by: RWS Community AI at 8:11 PM (GMT 1) on 23 Aug 2024]
emoji
  • Hello Belkacem,

    I understand that you're experiencing an issue with the Microsoft Translator Provider plugin in Trados Studio 2022 SR2. This issue seems to occur with larger files and is related to the authorization credentials. Here are some steps you can take to troubleshoot this issue:

    Step 1: Ensure you have the latest version of Trados Studio and the Microsoft Translator Provider plugin installed. You can check for updates within Trados Studio (Help > Check for updates).

    Step 2: If you have the latest versions and the problem persists, try uninstalling and reinstalling the Microsoft Translator Provider plugin. You can uninstall the plugin under Add-Ins > RWS AppStore > Installed plug-ins. Then, download the latest version of the plugin from the RWS AppStore and install it.

    Step 3: Check your Microsoft Azure credentials and ensure they are correctly entered in the plugin settings. Even though you're able to pull translations for smaller files, there might be a different authorization process for larger files.

    Step 4: If the issue persists, it might be related to the region settings. Although you've set the region to "None", try setting it to a specific region that matches your Microsoft Azure settings.

    If after following these steps the issue still persists, it might be a more complex issue that requires further investigation.

    Remember, it's important to keep your software and plugins up to date to ensure optimal performance and to benefit from the latest features and improvements.

    Best regards,

    RWS Community AI

    emoji
  •  you really  need to add your region it cant be left as none.

    You can find it here (provided you have access) by looking at the location. In our case its West Europe

    Screenshot of RWS AppStore Applications settings showing the 'Essentials' section with 'Location' highlighted, indicating 'West Europe'. Other details are redacted.

    I trust that once you validate this missing info you will be able to authenticate error free

    Lyds

    Lydia Simplicio | RWS Group

    _______
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 7:51 PM (GMT 1) on 29 Aug 2024]
  • Hi Lidia,
    I added our Location as "Global" as the following

    Screenshot of Microsoft Azure portal showing 'Essentials' with 'Location: Global' highlighted and other details redacted.

    unfortunately I still receive this error:
    Error message dialog box stating 'An unexpected error occurred. The error was logged at C:UsersredactedAppDataRoamingTradosAppStoreMicrosoftTranslatorProvider. An error occurred while sending the request.' with an 'OK' button.
    Any other suggestion
    regards

    Belkacem

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 8:00 PM (GMT 1) on 30 Aug 2024]
  •  please can you attach the log files which you can find under C:\Users\[username]\AppData\Roaming\Trados AppStore

    Is this the first time you are trying to use this plugin?
    Are you the only one who has reported this issue?

    By any chance are you working via a proxy because we are only supporting proxy as of 2.0.1.0 - Trados Studio 2024

    Worth a check

    Lyds

    Lydia Simplicio | RWS Group

    _______
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hi Lydia,
    you'll find the attached log file:

    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-20 13:21:33.9807 Error MoveNext
    An error occurred while sending the request.
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-20 13:21:34.0019 Error HandleError: System.Exception: An error occurred while sending the request.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-23 15:13:17.4631 Error MoveNext
    An error occurred while sending the request.
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-23 15:13:17.4631 Error HandleError: System.Exception: An error occurred while sending the request.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-23 15:13:24.5916 Error MoveNext
    Response status code does not indicate success: 401 (PermissionDenied).
        at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-23 15:13:24.5916 Error HandleError: System.Exception: Response status code does not indicate success: 401 (PermissionDenied).
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-23 15:13:31.2715 Error MoveNext
    Response status code does not indicate success: 401 (PermissionDenied).
        at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-23 15:13:31.2715 Error HandleError: System.Exception: Response status code does not indicate success: 401 (PermissionDenied).
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-23 16:01:49.0786 Error MoveNext
    An error occurred while sending the request.
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-23 16:01:49.0806 Error HandleError: System.Exception: An error occurred while sending the request.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-26 12:13:02.1315 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-26 12:13:02.2180 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-26 12:16:02.4941 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-26 12:18:57.2586 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-26 12:18:57.5118 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-26 12:19:05.1754 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-26 12:19:09.7015 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-27 11:24:12.9806 Error MoveNext
    An error occurred while sending the request.
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-27 11:24:13.0046 Error HandleError: System.Exception: An error occurred while sending the request.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-27 12:00:56.4493 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-27 12:01:19.0443 Error HandleError: System.Exception: The request is not authorized because credentials are missing or invalid.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.RequestTranslation(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.TryTranslate(String sourceLanguage, String targetLanguage, String textToTranslate, String categoryID)
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.Translate(LanguagePair languagepair, String textToTranslate)  
    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-30 15:38:32.4551 Error MoveNext
    An error occurred while sending the request.
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-30 15:38:32.4768 Error HandleError: System.Exception: An error occurred while sending the request.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi: 2024-08-30 15:55:36.1080 Error MoveNext
    An error occurred while sending the request.
        at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.<GetAccessTokenAsync>d__21.MoveNext()  
    MicrosoftTranslatorProvider.Helpers.ErrorHandler: 2024-08-30 15:55:36.1080 Error HandleError: System.Exception: An error occurred while sending the request.
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi.GetAuthToken()
       at MicrosoftTranslatorProvider.Studio.TranslationProvider.MicrosoftApi..ctor(String subscriptionKey, String region)
       at MicrosoftTranslatorProvider.ViewModel.MainWindowViewModel.AreMicrosoftCredentialsValid()  
    
    Yes the first time we use this plugin on SDL TRADOS Studio 2022 SR2, before the upgrade from 2021 of Studio we used MT Enhanced Trados Studio. All our team (15 members) are reporting this issue. I don't think we are working via a Proxy.
    regards
    Belkacem


    emoji
  • Hi ,
    I hope you're doing well! I would like to know if there is any update for the resolution of this issue. Even though we updated the plugin version to 1.2.0.0, we still receive this Error "The request is not authorized because the credentials are missing or invalid."
    Regards
    Belkacem

    emoji
  •  

    While waiting for Lydia, can you confirm whether you are using custom engines?  We had a call with Microsoft last week to try and resolve a similar problem and in the end it turned out to be a user isue.  Microsoft’s Translator API requires region-specific configuration for custom translation models.  If the custom engine is not deployed in the same region specified in the API request, or if the region parameter isn’t included or matched correctly in the configuration, the API may reject the request due to mismatched credentials or permissions.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hi Paul,
    Do you mean Custom engine with Sibscription ID (see the following capture)

    Screenshot of Microsoft Azure portal showing an 'Essentials' section with a highlighted Subscription ID field labeled 'PRODUCTION'.
    If the Category ID (Model) in the API is the Subscription ID
    Screenshot of Microsoft Translator Provider settings with a redacted API key, 'Global' selected for Region, and a redacted Category ID (Model) field.
    and if I Choose "Global" under the Region field I get this message when I Confirm 
    Error dialog box titled 'Unexpected error' with a message about an error logged in a user's AppData folder and an issue while sending the request.

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 2:26 PM (GMT 1) on 8 Oct 2024]
  •  

    Can you please check that the API keys you created in the "Keys and Endpoint" sections were also generated for this region.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  •   , Yes it is : 

    Screenshot of RWS AppStore Applications interface showing 'Keys and Endpoint' section with two obfuscated keys and a 'LocationRegion' field set to 'global'.

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 5:13 PM (GMT 1) on 8 Oct 2024]