InvalidAuthenticationToken: The access token is invalid - Language Studio

Rodolfo Carlos Gonzalez Herrera 0 Reputation points
2024-07-01T10:59:32.3266667+00:00

Hi ,

I'm trying to create an Azure Custom Text Classification project, but I'm unable to create it due to an Invalid Authentication Token error on Azure Language Studio (See below Image). Below is my current config :

  • My user account is the owner of the subscription and resource group.
  • The language resource has a Managed Identity account with blob contributor privileges on the storage account linked to the language resource
  • The blob containers are even set to public

But despite all the above , I still get an invalid token error ... I wonder , where is the restriction ?Screenshot 2024-07-01 185014

Azure AI Language
Azure AI Language
An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.
383 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Claudia Dos Santos Haz (CONCENTRIX CORPORATION) 935 Reputation points Microsoft Vendor
    2024-07-02T15:24:36.9166667+00:00

    Hi @Rodolfo Carlos Gonzalez Herrera,

    Thank you for reaching out to Microsoft Q&A forum!

    The “InvalidAuthenticationToken” error typically occurs when the API audience of your access token doesn’t match the API endpoint you’re calling. Here are some steps to troubleshoot this issue:

    Check the Resource Parameter:

    • In your login request, ensure that the resource parameter is set to [graph.microsoft.com](https://graph.microsoft.com).
      • If you’re using the v2 endpoint, consider getting the token from the v2 endpoint by calling this URL.
      Change Signature Algorithm:
      - **Recommended**: Change the application signature algorithm to RS256 instead of HS256.
      
         - [Also, modify the ](https://stackoverflow.com/questions/37885476/ms-graph-api-invalid-authentication-token)**[`responseType`](https://stackoverflow.com/questions/37885476/ms-graph-api-invalid-authentication-token)**[ parameter to include ](https://stackoverflow.com/questions/37885476/ms-graph-api-invalid-authentication-token)**[`token id_token`](https://stackoverflow.com/questions/37885476/ms-graph-api-invalid-authentication-token)**[ (instead of the default) to receive an access token in the response](https://stackoverflow.com/questions/37885476/ms-graph-api-invalid-authentication-token)[1](https://stackoverflow.com/questions/37885476/ms-graph-api-invalid-authentication-token).
      
         **Verify Permissions and Token Creation**:
      
            - Ensure that your app has the necessary permissions (e.g., **`Mail.Read`**) in the Azure portal.
      
               - Double-check the token creation process for any typos or incorrect permissions.
      
                  - [Consider token revocation as a potential cause](https://stackoverflow.com/questions/37885476/ms-graph-api-invalid-authentication-token)[2](https://devcodef1.com/news/1154910/invalid-authentication-token-in-azure-ai-studio).
      

    Remember to adjust the parameters and endpoints according to your specific use case

    0 comments No comments