@Sajal Soni Thanks for the question. The error message you’re seeing typically indicates that the subscription key you’re using for the Azure Document intelligence service is either incorrect or expired. It could also mean that the endpoint you’re using doesn’t match the one associated with your key. Here are a few things you can check:
- Subscription Key: Make sure that the
key
you’re passing toAzureKeyCredential(key)
is correct. You can find this in your Azure portal under the ‘Keys and Endpoint’ section of your Form Recognizer resource. - Endpoint: The endpoint should also match the one found in the same ‘Keys and Endpoint’ section in Azure portal.
Here is the document for authentication. https://azuresdkdocs.blob.core.windows.net/$web/dotnet/Azure.AI.FormRecognizer/4.1.0/index.html#authenticate-the-client