I am new to sharepoint webhooks and was referring this official site and this pnp sample documents to get notification detail.

I had successfully got notification hit in my Web application after any changes in sharepoint site, but couldn't get the exact notification details. Here is what I did.

I created a simple web application in .net framework, subscribed event notification using postman and got hits in my webApp.

Now here is the issue, I am using just ChangeManager.cs class of sample reference code, in my web application to get information about the Changes. I am also getting accessToken, but in ProcessNotification() function I got exception at this line saying "Access denied. You do not have permission to perform this action or access this resource." with "System.UnauthorizedAccessException".

Also the thing is at this line I have changed the function as below as it is changed:

am.GetAppOnlyAuthenticatedContext(url, realm, clientId, clientSecret);

I tried giving all permission from the AAD application, but all that didn't work.

Please let me know what I am doing wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.