LUIS to CLU migration (provided key is not authorized)

Matthew Black 0 Reputation points
2025-05-02T15:44:54.41+00:00

Hi there,
we're trying to migrate our LUIS app to CLU, and through the migration process we receive the following:
The provided key is not authorized to access the LUIS application..

Could you please help on this.

Thank you

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

1 answer

Sort by: Most helpful
  1. Prashanth Veeragoni 5,745 Reputation points Microsoft External Staff Moderator
    2025-05-02T17:26:11.8433333+00:00

    Hi Matthew Black,

    This issue typically arises when the Azure resource key (or token) you're using does not have the proper permissions to access the LUIS app you're trying to migrate. Here’s a step-by-step explanation and how to resolve it:

    The error:

    The provided key is not authorized to access the LUIS application

    means that the Azure Cognitive Services key (for CLU) you're using either:

    ·       Is not linked to the LUIS authoring resource, or

    ·       Doesn’t have access to read LUIS apps, or

    ·       You are using the wrong region or endpoint in your migration script.

    How to Resolve This Issue

    Step1: Check Your LUIS Authoring Key

    Ensure you're using the LUIS Authoring Key, not the prediction key, and it is associated with the correct region.

    Go to:

    Azure Portal → LUIS Resource → Keys and Endpoint → Authoring Key

    Use that key in the migration process.

    Step2: Validate Region Compatibility

    Your LUIS app must be in a supported region for CLU migration. Only westus, westeurope, and australiaeast are supported for LUIS authoring apps.

    If your LUIS app is in another region, you'll need to:

    ·       Export the LUIS app manually (as JSON) and

    ·       Import it to a supported region or directly to a CLU resource via the migration tool.

    Step3: Use Azure CLI Migration Tool Correctly

    Use the LUIS migration tool with the correct parameters:

    dotnet run -- \
      --luisAppId "<LUIS_APP_ID>" \
      --luisAuthoringKey "<LUIS_AUTHORING_KEY>" \
      --luisAuthoringRegion "westus" \
      --targetCLUResourceId "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<CLU-resource>" \
      --targetCLURegion "westus"
    

    Step4: Validate Azure Role Assignments

    Ensure the identity (user or service principal) running the migration has:

    ·       Cognitive Services Contributor or

    ·       Owner role on both:

    o   The LUIS authoring resource

    o   The target CLU resource

    Step5: Check for API Deprecation

    LUIS is deprecated and will retire by October 2025, and some APIs might already be limited or disabled for new resources. Use the official migration documentation for updated guidance.

    Hope this helps, do let me know if you have any further queries.

    Thank you! 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.