Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.01 KB

File metadata and controls

31 lines (24 loc) · 1.01 KB
description Automatically generated file. DO NOT MODIFY
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\Group;


$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);

$requestBody = new Group();
$requestBody->setDescription('Group with designated owner and members');
$requestBody->setDisplayName('Operations group');
$requestBody->setGroupTypes([	]);
$requestBody->setMailEnabled(false);
$requestBody->setMailNickname('operations2019');
$requestBody->setSecurityEnabled(true);
$additionalData = [
	'owners@odata.bind' => [
'https://graph.microsoft.com/v1.0/users/26be1845-4119-4801-a799-aea79d09f1a2', ],
	'members@odata.bind' => [
'https://graph.microsoft.com/v1.0/users/ff7cb387-6688-423c-8188-3da9532a73cc', 'https://graph.microsoft.com/v1.0/users/69456242-0067-49d3-ba96-9de6f2728e14', ],
];
$requestBody->setAdditionalData($additionalData);

$result = $graphServiceClient->groupsWithUniqueName('{uniqueName}', )->patch($requestBody)->wait();