Created
October 29, 2017 10:43
-
-
Save andrei-markeev/52905c332f8cdf2963ca3290a0b8b2b3 to your computer and use it in GitHub Desktop.
Minimum example for working with SP webhooks from Azure Functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (azureContext, req) { | |
if (req.query.validationtoken) { | |
azureContext.log('Validation token received: ' + req.query.validationtoken); | |
azureContext.res = { | |
body: req.query.validationtoken, | |
isRaw: true | |
}; | |
azureContext.done(); | |
return; | |
} | |
azureContext.log("Request body:", req.body); | |
azureContext.done(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can also use sphooks if you prefer cli tools.