0

Team,

I am trying to subscribe webhook for all the lists in all O365 SharePoint sites. Able to subscribe most of the sites, but in few sites i am getting access denied error. I have site collection admin privilege in all the sites.

code:

            List lst = _ctx.Web.Lists.GetByTitle(ListTitle);
            _ctx.Load(lst);
            await _ctx.ExecuteQueryAsync();
            if (lst != null)
            {
                var subscription = lst.GetWebhookSubscriptions(); // getting error in this line
                ....

             }

Error:

   {"odata.error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}

May I know what could be the issue?

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.