Mark a timeOffReason as inactive by setting the isActive property. Every team must include at least one timeoff reason.
This method does not remove the specified timeOffReason instance. timeOffItem instances that have been assigned this reason remain assigned to this reason.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Schedule.ReadWrite.All, Group.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
Schedule.ReadWrite.All
Note: This API supports admin permissions. Global admins can access groups that they are not a member of.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
await graphClient.Teams["{team-id}"].Schedule.TimeOffReasons["{timeOffReason-id}"].DeleteAsync();
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$graphServiceClient->teams()->byTeamId('team-id')->schedule()->timeOffReasons()->byTimeOffReasonId('timeOffReason-id')->delete();