Need long-duration get_face_access_token tokens for Azure AI Vision Face API (currently only 7 days) for liveness detection

Niket Kumar Singh 600 Reputation points
2025-05-07T06:13:59.1166667+00:00

HelloTeam,

We are using the Azure AI Vision Face API and the Face Client SDK for implementing the liveness detection feature in our production environment. We have followed all the official setup and integration guidance:

Get started with the Azure AI Vision Face UI Web SDK

Accessing Azure AI Vision Face Client SDK Release Artifacts

We are using the get_face_access_token script provided in the repository to generate access tokens that allow us to install the SDK and run the liveness detection flow.

Currently, the tokens are only valid for 7 days.

This change has created challenges:

  • We have integrated the solution into production, where frequent token renewals are not ideal.
  • We are concerned about potential service disruptions if the token expires and is not refreshed in time.
  • We would like to avoid setting up complex automation just to renew tokens every week.
  • Is there any way to configure or request longer-duration tokens (e.g., 3 or 6 months) specifically for production deployments of liveness detection?
  • What are Microsoft’s recommendations or best practices for managing tokens in production for liveness detection use cases?
  • Is this expiration behavior linked to the subscription type (for example, CSP vs. ISV), or is it a universal change across all Azure customers?

We would appreciate any clarification or guidance so we can align our deployment strategy and ensure uninterrupted use of the liveness detection feature in production.

Thank you for your support!

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,425 questions
{count} votes

Accepted answer
  1. kothapally Snigdha 2,500 Reputation points Microsoft External Staff Moderator
    2025-05-07T12:12:31.8966667+00:00

    Hi @Niket Kumar Singh

    The Azure AI Vision Face API's limited access tokens for liveness detection have a maximum expiration time of 24 hours (86,400 seconds). The expired Time parameter can be set between 60 seconds and 86,400 seconds when issuing tokens via the issue Limited Access Token API. Tokens valid for 7 days or longer (e.g., 3 or 6 months) are not supported.

    kindly refer the link Use limited access tokens for Face

    Microsoft advises automating token refresh in production to prevent service disruption, as longer-duration tokens are not configurable for production deployments.

    This expiration behavior is consistent across Azure customers and is not dependent on subscription type (CSP vs. ISV).

    For liveness detection, session authorization tokens expire after 48 hours or sooner if deleted. Thus, session management and timely token renewal are necessary to maintain uninterrupted service

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


0 additional answers

Sort by: Most helpful

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.