public function updateOAuth2Token($newOAuth2AccessToken)
    {
        try{
          $this->serviceContext->updateOAuth2Token($newOAuth2AccessToken);
          $realmID = $newOAuth2AccessToken->getRealmID();
          $this->serviceContext->realmId = $realmID;
          $this->setupRestHandler($this->serviceContext);
        } catch (SdkException $e){
            $this->serviceContext->IppConfiguration->Logger->CustomLogger->Log(TraceLevel::Error, "Encountered an error while updating OAuth2Token." . $e->getMessage());
            $this->serviceContext->IppConfiguration->Logger->CustomLogger->Log(TraceLevel::Error, "Stack Trace: " . $e->getTraceAsString());
        }
        return $this;
    }