diff --git a/local/o365/classes/adminsetting/permissions.php b/local/o365/classes/adminsetting/permissions.php index 1c3fae0bc..264debbaf 100644 --- a/local/o365/classes/adminsetting/permissions.php +++ b/local/o365/classes/adminsetting/permissions.php @@ -76,13 +76,6 @@ public function output_html($data, $query = '') { $settinghtml = ''; if ($clientcredspresent === true && $endpointspresent === true) { - $oidcconfig = get_config('auth_oidc'); - $httpclient = new \local_o365\httpclient(); - $clientdata = new \local_o365\oauth2\clientdata($oidcconfig->clientid, $oidcconfig->clientsecret, - $oidcconfig->authendpoint, $oidcconfig->tokenendpoint); - $resource = \local_o365\rest\azuread::get_resource(); - $token = \local_o365\oauth2\systemtoken::instance($resource, $clientdata, $httpclient); - $apiclient = new \local_o365\rest\azuread($token, $httpclient); $existingsetting = $this->config_read($this->name); if (!empty($existingsetting)) {