msgraph: add metadata to users to connect with default calendar

This commit is contained in:
2022-05-06 10:13:32 +02:00
parent 5331f1becc
commit 9935af0497
9 changed files with 181 additions and 12 deletions

View File

@@ -40,13 +40,10 @@ class AzureGetMachineAccessTokenCommand extends Command
protected function configure()
{
$this
->addOption('tenant', 't', InputOption::VALUE_OPTIONAL, 'the tenant, usually the application name', 'common');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->azure->tenant = $input->getOption('tenant');
$this->azure->scope = ['https://graph.microsoft.com/.default'];
$authorizationUrl = explode('?', $this->azure->getAuthorizationUrl(['prompt' => 'consent']));
// replace the first part by the admin consent authorization url