code: func validateToken(env azure.Environment, token *azure.ServicePrincipalToken) error {
  	c := subscriptionsClient(env.ResourceManagerEndpoint)
  	c.Authorizer = token
  	_, err := c.List()
  	if err != nil {
  		return fmt.Errorf("Token validity check failed: %v", err)
  	}
  	return nil
  }
docs: // validateToken makes a call to Azure SDK with given token, essentially making
  // sure if the access_token valid, if not it uses SDK’s functionality to
  // automatically refresh the token using refresh_token (which might have
  // expired). This check is essentially to make sure refresh_token is good.