Hi @SHUO .H ,
I understand the 401 error is coming when access site remotely with CSOM.
Here are some suggestions to narrow down the issue:
- Try to create a new web application without any AAM/Certificate settings and test if CSOM can connect to the site host in the new web application. If the CSOM is working, then the issue is related to the AAM binding, need to check in IIS and web.config.
- If the issue is the same for the new web application, then it needs to check the CSOM request with Fiddler and check ULS log for detailed information.
Thanks
Best Regards
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.