You are not logged in.
Modifications made:
application.class.php
insert line 33 |
use GlpiPlugin\Oauthimap\Provider\AzureGOV;
insert line 111
[
'name' => 'tenant_id',
'label' => __('Tenant ID', 'oauthimap'),
'type' => 'additionnal_param',
'list' => false,
'provider' => AzureGOV::class,
],
Insert Line 460
case AzureGOV::class:
$options['prompt'] = 'login';
break;
Insert Line 504
AzureGOV::class,
Line 592
case AzureGOV::class:
$scopes = [
'openid', 'email', // required to be able to fetch owner details
'offline_access',
'https://outlook.office365.us/IMAP.AccessAsUser.All',
];
break;
Insert Line 618
AzureGOV::class => 'https://docs.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth',
CP azure.class.php azuregov.class.php
Rename class to AzureGOV and update extends \TheNetworg\OAuth2\Client\Provider\AzureGOV
Line 67 change to:
return 'outlook.office365.us';
thenetworg/oauth2-azure/src/Provider CP Azure.php AzureGOV.php
Update Line 26
public $urlLogin = 'https://login.microsoftonline.us/';
Update Line 39
public $urlAPI = 'https://graph.windows.us/';
Result: The new provider shows up in GPLI as AzureGOV as expected and I'm able to successfully create an authorization. Receiver successfully connects.
The only thing I find interesting is the connection string returned compared to the commercial tenant:
Commercial Cloud: {outlook.office365.com/imap-oauth-1/ssl/validate-cert/tls/norsh/secure}INBOX
GOV Cloud: {outlook.office365.us/imap-oauth-3/ssl/validate-cert/tls/norsh/secure}INBOX
Last edited by urbancrawler (2024-10-09 14:05:29)
Offline