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:
- Azure Video Indexer Documentation: https://learn.microsoft.com/en-us/azure/azure-video-indexer
- Azure AD Documentation: https://learn.microsoft.com/en-us/azure/active-directory
- OAuth 2.0 Client Credentials Grant: https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
- Azure Functions Documentation: https://learn.microsoft.com/en-us/azure/azure-functions
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