persistent INVALID_AUTH_SUBSCRIPTION_KEY error, when all permissions and credentials appear correct

Kalechi Noel 0 Reputation points
2025-08-29T02:53:44+00:00

I am trying to batch pull clips from a Blob using powershell for processing in video indexer but I keep gettin INVALID_AUTH_SUBSCRIPTION_KEY error, when all permissions and credentials appear correct. WE have triple checked Client ID, Tenant ID, Secret... and everything mentioned in documentation. I suspect theres an issue on the backend. Please advise.

Azure AI Video Indexer
Azure AI Video Indexer
An Azure video analytics service that uses AI to extract actionable insights from stored videos.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 41,111 Reputation points Volunteer Moderator
    2025-10-27T16:40:19.6+00:00

    Hello Noel !

    Thank you for posting on Microsoft Learn Q&A.

    I think your problem is coming from mixing the 2 auth flows because ARM based accounts use Entra ID with no subscription key header while the dev portal flow uses Ocp-Apim-Subscription-Key so if you send Ocp-Apim-Subscription-Key to an ARM endpoint you will get that error.

    Trial accounts can’t use the API anymore so you need a paid ARM based account.

    https://learn.microsoft.com/en-us/azure/azure-video-indexer/video-indexer-use-apis

    You need to use the correct auth flow for ARM accounts, get an ARM bearer token from Entra ID and call the ARM endpoint to generate a VI access token then use that token (only) with api.videoindexer.ai operations and don’t send Ocp-Apim-Subscription-Key anywhere in this flow.

    https://learn.microsoft.com/en-us/rest/api/videoindexer/generate/access-token?view=rest-videoindexer-2025-04-01

    0 comments No comments

Your answer

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