Set-PnPGraphSubscription
SYNOPSIS
Required Permissions
- Microsoft Graph API : depends on the resource the subscription was created on. Renewing a subscription requires read permissions on that resource, i.e.
Mail.Readfor a subscription on messages orSites.ReadWrite.Allfor one on a SharePoint list. Note that the permission is not always the same as the one needed to create the subscription, so use the table in Update subscription rather than the one for creating.
Updates an existing Microsoft Graph subscription.
SYNTAX
Set-PnPGraphSubscription -Identity <GraphSubscriptionPipeBind> -ExpirationDate <DateTime> [-Connection <PnPConnection>]
DESCRIPTION
Allows to update an existing Microsoft Graph subscription.
EXAMPLES
EXAMPLE 1
Set-PnPGraphSubscription -Identity bc204397-1128-4911-9d70-1d8bceee39da -ExpirationDate "2020-11-22T18:23:45.9356913Z"
Updates the Microsoft Graph subscription with the id 'bc204397-1128-4911-9d70-1d8bceee39da' to expire at the mentioned date.
PARAMETERS
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ExpirationDate
Date and time to set the expiration to. Take notice of the maximum allowed lifetime of the subscription endpoints as documented at https://learn.microsoft.com/graph/api/resources/subscription#maximum-length-of-subscription-per-resource-type
Type: DateTime
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The unique id or an instance of a Microsoft Graph Subscription.
Type: GraphSubscriptionPipeBind
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False