Unable to Generate Permanent Token for Azure Video Indexer Managed by ARM

Fabian Enrique Niño Narvaez 0 Reputation points
2024-08-22T16:15:25.71+00:00

Hello Azure Support Team,

I am currently facing an issue with generating a permanent access token for Azure Video Indexer. My Video Indexer account is managed through Azure Resource Manager (ARM), and I have been trying to perform operations such as listing videos and managing content. However, when attempting to generate a permanent token, I receive the following error:

Error Message:

jsonCopiar código
{

This error suggests that I need to use the ARM management API for management operations. However, my goal is to generate a permanent access token or at least extend the token's validity to avoid frequent renewals for continuous access to the Video Indexer API.

Steps Taken:

  1. I tried generating a token using the Video Indexer API directly, which resulted in the error mentioned above.
  2. I attempted to manage tokens via the ARM API, but the token generated is temporary and lasts only for an hour.

Additional Issue: All documentation related to the error, including the link provided in the error message (https://aka.ms/avam-arm-docs), leads to a 404 page not found error. This makes it difficult to troubleshoot and resolve the issue on my own.

Questions:

  1. Is there a method to generate a permanent or long-lasting token for Azure Video Indexer when managed by ARM?
  2. If not, what is the recommended approach to automate the token renewal process for continuous API access?
  3. Are there specific settings or configurations I should adjust in ARM to manage tokens more effectively for Video Indexer?
  4. Could you provide or direct me to the correct and updated documentation for this issue?

Thank you for your assistance. Any guidance on resolving this issue or alternative approaches would be greatly appreciated.Hello Azure Support Team,

I am currently facing an issue with generating a permanent access token for Azure Video Indexer. My Video Indexer account is managed through Azure Resource Manager (ARM), and I have been trying to perform operations such as listing videos and managing content. However, when attempting to generate a permanent token, I receive the following error:

Error Message:

json
{

This error suggests that I need to use the ARM management API for management operations. However, my goal is to generate a permanent access token or at least extend the token's validity to avoid frequent renewals for continuous access to the Video Indexer API.

Steps Taken:

  1. I tried generating a token using the Video Indexer API directly, which resulted in the error mentioned above.
  2. I attempted to manage tokens via the ARM API, but the token generated is temporary and lasts only for an hour.

Additional Issue: All documentation related to the error, including the link provided in the error message (https://aka.ms/avam-arm-docs), leads to a 404 page not found error. This makes it difficult to troubleshoot and resolve the issue on my own.

Questions:

  1. Is there a method to generate a permanent or long-lasting token for Azure Video Indexer when managed by ARM?
  2. If not, what is the recommended approach to automate the token renewal process for continuous API access?
  3. Are there specific settings or configurations I should adjust in ARM to manage tokens more effectively for Video Indexer?
  4. Could you provide or direct me to the correct and updated documentation for this issue?

Thank you for your assistance. Any guidance on resolving this issue or alternative approaches would be greatly appreciated.

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

1 answer

Sort by: Most helpful
  1. Sina Salam 14,551 Reputation points
    2024-08-22T18:13:59.5433333+00:00

    Hello

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are unable to generate Permanent Token for Azure Video Indexer Managed by ARM.

    Regarding your questions:

    Q1.

    Is there a method to generate a permanent or long-lasting token for Azure Video Indexer when managed by ARM?

    You can find many resources that shows how to generate a long-lasting access token for Azure Video Indexer when managed by ARM, that you can use the ARM management API which allows you to create an access token with the desired permissions and scope by making a POST request to the following endpoint to generate the access token: https://learn.microsoft.com/en-us/rest/api/videoindexer/generate/access-token?view=rest-videoindexer-2024-01-01.

    Ans:

    However, Azure Video Indexer does not support permanent or long-lasting tokens due to security reasons. The tokens provided for API access are short-lived and are designed to enhance security by requiring regular renewal.

    Q2:

    If not, what is the recommended approach to automate the token renewal process for continuous API access?

    Ans:

    For continuous API access, you need to automate the token renewal process by:

    • Creating an Azure Active Directory (AAD) service principal that can be used to authenticate and obtain tokens.
    • Using Azure AD to obtain an access token programmatically to Registering an Application in Azure AD and Requesting Tokens.
    • Implementing a script or application that periodically requests a new token before the old one expires.

    Q3:

    Are there specific settings or configurations I should adjust in ARM to manage tokens more effectively for Video Indexer?

    Ans:

    Sorry! There are no specific ARM settings for managing Video Indexer tokens directly. You only need to ensure that your ARM templates and deployments include Service Principal Credentials and appropriate Role Assignments.

    Q4:

    Could you provide or direct me to the correct and updated documentation for this issue?

    Ans:

    For most updated and accurate information, you can use the following documents:

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam

    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.