We have an Remote Event Receiver which is deployed in Azure and running for an SPO site.
It was running fine, but from yesterday, it is not working properly.
After a detailed investigation, we found an error from Application Insights.
Error Details:
CodeExecuteQuery threw following exception: System.Net.WebException: The remote server returned an error: (401) Unauthorized
Can anyone tell, what is happening here?


Md Tahmidul AbedinRank #443 · 5.7K reputationPosted Mar 14, 2018, 3:38 AM EDT
Hi Asaduzzaman,
If the current secret id is expired then you have to remove the it and create a new one.I thing this article will be helpful for to do the procedure.
Let me know if it works.