Getting "Error occurred in deployment step 'Install SharePoint Add-in': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)" but the add-in still loads

Eric Shen 31 Reputation points
2022-11-23T02:06:28.633+00:00

In the past, I was able to use Visual Studio to install apps (add-in) on my SharePoint online development site. However my Windows credentials got corrupted and I had to remove and add back in my Microsoft work accounts (I have two of them).

Now when I try to install an app, I get an "Error occurred in deployment step 'Install SharePoint Add-in': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)" but the app still loads and I'm able to use Visual Studio to set breakpoints.

I uninstalled and reinstalled Visual Studio and still get the same error. I know the problem is something wrong with my computer. I'm looking for a way to track down what additional setting I need to change to get rid of this error message.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-11-23T08:13:27.397+00:00

    Hi @Eric Shen
    Please refer to following steps to fix the issue

    1. Shutdown all instances of Visual Studio
    2. Delete %LocalAppData%\Microsoft\VisualStudio\15.0_f4938f75\privateregistry.bin file (the ID after 15.0_ may be different per machines)
    3. Start VS as normal user

    Here is a similar issue with yours for reference
    https://developercommunity.visualstudio.com/t/access-denied-error-1/31188


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.



  2. Eric Shen 31 Reputation points
    2022-12-01T16:35:06.167+00:00

    Before I uninstalled and reinstalled Visual Studio, I did run Repair on Visual Studio.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.