code: def get_token_func():
          
          print("{}: token updater was triggered".format(datetime.datetime.now()))
  
          # in this example, the OAuth token is obtained using the ADAL library
          # however, the user can use any preferred method
          context = adal.AuthenticationContext(
              str.format("https://login.microsoftonline.com/{}", settings.ACTIVE_DIRECTORY_TENANT_ID),
              api_version=None, validate_authority=True)
  
          oauth_token = context.acquire_token_with_client_credentials(
              "https://storage.azure.com",
              settings.ACTIVE_DIRECTORY_APPLICATION_ID,
              settings.ACTIVE_DIRECTORY_APPLICATION_SECRET)
  
          # return the token itself and the interval to wait before this function should be called again
          # generally oauth_token['expiresIn'] - 180 is a good interval to give, as it tells the caller to
          # refresh the token 3 minutes before it expires, so here we are assuming that the token expiration
          # is at least longer than 3 minutes, the user should adjust it according to their AAD policy
          return oauth_token['accessToken'], oauth_token['expiresIn'] - 180
docs: This function makes a call to AAD to fetch an OAuth token
          :return: the OAuth token and the interval to wait before refreshing it