Adds a new webhook to the specified list
Command: spo list webhook add [options]
Options:
-u, --webUrl <webUrl> | URL of the site where the list to add the webhook to is located
-l, --listId [listId] | ID of the list to which the webhook which should be added. Specify either id or title but not both
-t, --listTitle [listTitle] | Title of the list to which the webhook which should be added. Specify either id or title but not both
-n, --notificationUrl <notificationUrl> | The notification url
-e, --expirationDateTime [expirationDateTime] | The expiration date. Will be set to max (6 months from today) if not provided.
-c, --clientState [clientState] | A client state information that will be passed through notifications
Usage:
Add a web hook to the list Documents with the specified notification url and the default expiration date
spo list webhook add --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --notificationUrl 'https://my-func.azurewebsites.net/webhook'
Add a web hook to the list Documents with an expiration date of January 21st, 2019
spo list webhook add --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --id cc27a922-8224-4296-90a5-ebbc54da2e85 --notificationUrl 'https://my-func.azurewebsites.net/webhook' --expirationDateTime '2019-01-21'
Add a web hook to the list Documents with a very specific expiration date of 6:15 PM on March 2nd, 2019 and a client state
spo list webhook add --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --id cc27a922-8224-4296-90a5-ebbc54da2e85 --notificationUrl 'https://my-func.azurewebsites.net/webhook' --expirationDateTime '2019-03-02T18:15' --clientState "Hello State!"
Adds a new webhook to the specified list
Command: spo list webhook add [options]
Options:
-u, --webUrl <webUrl> | URL of the site where the list to add the webhook to is located
-l, --listId [listId] | ID of the list to which the webhook which should be added. Specify either id or title but not both
-t, --listTitle [listTitle] | Title of the list to which the webhook which should be added. Specify either id or title but not both
-n, --notificationUrl <notificationUrl> | The notification url
-e, --expirationDateTime [expirationDateTime] | The expiration date. Will be set to max (6 months from today) if not provided.
-c, --clientState [clientState] | A client state information that will be passed through notifications
Usage:
Add a web hook to the list Documents with the specified notification url and the default expiration date
Add a web hook to the list Documents with an expiration date of January 21st, 2019
Add a web hook to the list Documents with a very specific expiration date of 6:15 PM on March 2nd, 2019 and a client state