Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 627 Bytes

File metadata and controls

21 lines (14 loc) · 627 Bytes
description Automatically generated file. DO NOT MODIFY
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\FileAttachment;


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

$requestBody = new FileAttachment();
$requestBody->setOdataType('#microsoft.graph.fileAttachment');
$requestBody->setName('menu.txt');
$requestBody->setContentBytes(\GuzzleHttp\Psr7\Utils::streamFor(base64_decode('base64bWFjIGFuZCBjaGVlc2UgdG9kYXk=')));

$result = $graphServiceClient->me()->events()->byEventId('event-id')->attachments()->post($requestBody)->wait();