How to fetch the expiration date of an license that's assigned to a user using Graph APIs? Is there any direct or indirect way available to get the data?

Seepana Rajaraju 0 Reputation points

I need to know the API or a way to fetch the expiration date of an Azure license that's assigned to a user in a tenant.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,399 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,310 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 100K Reputation points MVP

    License expiration date is exposed via the /beta/directory/subscriptions endpoint (look for the nextLifecycleDateTime property). Currently not supported in /v1.0.

    0 comments No comments

  2. Sourabh Gupta 800 Reputation points Microsoft Vendor

    This Capability was introduced by Microsoft in Graph-Beta. Look for the nextLifecycleDateTime property

    Using Graph API:$select=id,nextLifecycleDateTime,createdDateTime,ocpSubscriptionId

    Using PowerShell:


    Permissions Needed:

    Delegated (work or school account) - Organization.Read.All, Directory.Read.All

    Delegated (personal Microsoft account) - Not supported.

    Application - Organization.Read.All, Directory.Read.All, Organization.ReadWrite.All

    There was a feature requested by someone, which can be accessed here


    Refer to the screenshot below for the sample response


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments