spo list webhook add¶
Adds a new webhook to the specified list
Usage¶
m365 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
listId
orlistTitle
but not both -t, --listTitle [listTitle]
- Title of the list to which the webhook which should be added. Specify either
listId
orlistTitle
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
-h, --help
- output usage information
--query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text
. Defaulttext
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Examples¶
Add a web hook to the list Documents located in site https://contoso.sharepoint.com/sites/ninja with the notification url https://contoso-funcions.azurewebsites.net/webhook and the default expiration date
m365 spo list webhook add --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --notificationUrl https://contoso-funcions.azurewebsites.net/webhook
Add a web hook to the list Documents located in site https://contoso.sharepoint.com/sites/ninja with the notification url https://contoso-funcions.azurewebsites.net/webhook and an expiration date of January 21st, 2019
m365 spo list webhook add --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --notificationUrl https://contoso-funcions.azurewebsites.net/webhook --expirationDateTime 2019-01-21
Add a web hook to the list Documents located in site https://contoso.sharepoint.com/sites/ninja with the notification url https://contoso-funcions.azurewebsites.net/webhook, a very specific expiration date of 6:15 PM on March 2nd, 2019 and a client state
m365 spo list webhook add --webUrl https://contoso.sharepoint.com/sites/ninja --listTitle Documents --notificationUrl https://contoso-funcions.azurewebsites.net/webhook --expirationDateTime '2019-03-02T18:15' --clientState "Hello State!"