Azure Video Indexer using Application Permissions

Stavros Koureas 16 Reputation points
2025-07-11T07:49:10.7033333+00:00

I have an application which retrieves videos from confluence, then uses Azure Video Indexer to get the transcript and then put the content into an internal database for RAG using an LLM.

When it comes for Azure Video Indexer there two ways to analyze the video and get the transcript, either using a trial account, either using a paid account. Both they need a token which is expiring every one hour. Given that each video takes 5-10 mins to process we are going to need many tokens.

Trial users have limited number of hours for videos analysis so it makes sense to use only paid accounts. In order to use paid accounts and generate a token the only way is though Azure Management API.

https://management.azure.com/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.VideoIndexer/accounts/{account_name}/generateAccessToken?api-version=2025-04-01

And then using this token to another call https://api.videoindexer.ai/{location}/Accounts/{account_id}/Videos?name={video_name}

The Azure Management API uses Delegated permissions and therefore a user must have singed in on the host where the application runs.

enter image description here

But this does not make sense for the use-case, as the application itself should have the ability to do this without a user context.

On the other hand there is another api to generate tokens

https://api.videoindexer.ai/Auth/{location}/Accounts/{account_id}/AccessToken

And then using this token to another call

https://api.videoindexer.ai/{location}/Accounts/{account_id}/Videos?name={video_name}

This is using the subscription key from the Azure Video Indexer Portal into the headers

enter image description here

But this can be used only for trial accounts with the hours limitation, as when using a paid account id with this api for token generation there is the following error:

This request is not supported in Paid locations. It is supported in Video Indexer Trial only. Trace id: '26d00055-39e1-42b1-9cc1-f02d5a5c49f4

Also the tokens generated via Azure Portal on Video Indexer are valid for one hour, so there should be a way to be authenticated using an app and generate tokens programatically

User's image

Other articles: https://learn.microsoft.com/en-us/answers/questions/2179725/getting-issue-while-generating-access-token-for-ai?page=1&orderby=Helpful&comment=answer-1935651&translated=false#newest-answer-comment

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

1 answer

Sort by: Most helpful
  1. Manas Mohanty 8,150 Reputation points Microsoft External Staff Moderator
    2025-07-11T09:53:51.86+00:00

    Hi Stavros Koureas

    Thank you for agreeing to share the details in a new ticket.

    Cross checked with FTE here internally.

    it does not support persistent access tokens for the Management API and per design. This design ensures secure, scoped access to user-specific resources.

    However, for background jobs, impersonation is not ideal.

    Could you check the below python Sample to automate access token generation if the authentication fails

    https://github.com/Azure-Samples/azure-video-indexer-samples/blob/master/API-Samples/Python/video_indexer_api_samples.ipynb

    Thank you for understanding the current limitation on Azure AI video indexer

    0 comments No comments

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.