AI-102 Practice Question: Implement natural language processing solutions
Exhibit
{
"error": {
"code": "403",
"message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.",
"innererror": {
"code": "InvalidSubscriptionKey",
"message": "The provided subscription key is not valid for the Cognitive Services resource."
}
}
}Refer to the exhibit. You receive this error when calling an Azure Cognitive Services API. What is the most likely cause?
⚠ Common exam trap
A common mix-up: candidates confuse region mismatch with key validity, but Azure Cognitive Services keys are not region-bound—they are resource-bound, so the error is about the key not matching the resource, not the region.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The subscription key is not valid for this Cognitive Services resource.
The error indicates that the subscription key provided is not associated with the Cognitive Services resource being accessed. In Azure Cognitive Services, each resource has a unique set of keys, and using a key from a different resource (even in the same region) will result in a 401 Unauthorized error with this specific message. Option D is correct because the key must match the resource's endpoint exactly.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The API endpoint is incorrect.
Why it's wrong here
The error is about the key, not the endpoint.
- ✗
The subscription key has expired.
Why it's wrong here
The error says invalid, not expired.
- ✗
The subscription key is from a different region.
Why it's wrong here
Keys are not region-specific; they are tied to the resource.
- ✓
The subscription key is not valid for this Cognitive Services resource.
Why this is correct
Inner error explicitly states that.
Go deeper
Related to this question
About these practice questions
One of 945 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.