Quantcast
Viewing all articles
Browse latest Browse all 10096

Access denied. You do not have permission to perform this action or access this resource.

Hi

I am developing an Azure web job which connects to SP online and do some works each 5 min. It uses an app ID & secret for authentication and I am using CSOM to develop this.

The issue is sometimes it fails when it tries to get lists from the SharePoint site. Sometimes it works sometimes it doesn't! the error message is about permission and access, but its weird why it partially works!

I can not rely on this to develop a solution as is doesn't look really stable. following you can see I am getting lots of error committed to my SQL log table:

Image may be NSFW.
Clik here to view.

Error message:

Microsoft.SharePoint.Client.ServerUnauthorizedAccessException: Access denied. You do not have permission to perform this action or access this resource.
   at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
   at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
   at Microsoft.SharePoint.Client.ClientRequest.ExecuteQuery()
   at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQuery()
   at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
   at DCI.Online.WebJob.TaskCreator.TimerJob.ProcessJob(TaskCreatorSetting setting, TraceWriter traceLogger) in C:\Users\raziztabar\Documents\Repos\WebJob\Online.WebJob.ItemCreator\TimerJob.cs:line 52

My code:

Image may be NSFW.
Clik here to view.

Also I tried to run the same call by using powershell, but I got the same error message about 50% of runs:

Image may be NSFW.
Clik here to view.

another powershell run:

Image may be NSFW.
Clik here to view.

after googling the issue and lot of research I could not figure it out whats the issue!

Any idea and thoughts are appreciated.





Viewing all articles
Browse latest Browse all 10096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>