diff --git a/local/o365/lib.php b/local/o365/lib.php index 565c3dec6..aa078a075 100644 --- a/local/o365/lib.php +++ b/local/o365/lib.php @@ -272,8 +272,9 @@ function local_o365_get_auth_token() { if (function_exists('apache_request_headers')) { $headers = apache_request_headers(); - if (isset($headers['Authorization'])) { - $authtoken = substr($headers['Authorization'], 7); + $headers = array_change_key_case($headers, CASE_LOWER); + if (isset($headers['authorization'])) { + $authtoken = substr($headers['authorization'], 7); } }