public function getAuthorizationCodeLocation()
{
if ($this->validateTenantName()) {
$path = '/' . $this->tenantName . '/oauth2/authorize';
$queryData = ['response_type' => 'code', 'client_id' => $this->appClientId, 'resource' => self::URL_MICROSOFT_ONLINE . '/'];
$request = $this->getClient()->prepareRequest($path, 'GET', self::AUTH_API_VERSION, self::URL_LOGIN_WINDOWS, $queryData);
$response = $this->getClient()->call($request);
$location = null;
if (302 == $response->getResponseCode()) {
$location = $response->getHeader('Location');
}
return $location;
} else {
throw new AzureException('Tenant name is not valid. Failed process authorization.');
}
}