Search code examples
azureazureservicebusazure-sdk-.net

Token expiry time from ServiceBusClient class of Azure.Messaging.ServiceBus


If I create a ServiceBusClient using the Sas Token Method, is there a way(property) to get the token expiry time from the ServiceBusClient object? Because, I will discard the token and down the timeline, I want to be able to identify the expiry and refresh it before it throws the token expiry error.


Solution

  • Looking at the ServiceBusClient documentation here, it is not possible to extract the token expiry time from the instance of that object.

    This is something you will need to handle on your own.