---
title: Azure AD Connect – Getting “An error occurred while connecting to the state store” error after updating AAD connect configuration - cubesys
description: "Recently I had to update the configuration of an existing Azure AD Connect – the directly synchronization tool from Microsoft to synchronize your Active Directory identities to Azure AD – instance. It was running the latest version at that time (1.5.42). The error was: An error occurred while connecting to…"
---

[Latest News & Blogs - cubesys ](https://www.cubesys.com.au/blog)

# [Azure AD Connect – Getting “An error occurred while connecting to the state store” error after updating AAD connect configuration - cubesys](https://www.cubesys.com.au/blog/azure-ad-connect-getting-an-error-occurred-while-connecting-to-the-state-store-error-after-updating-aad-connect-configuration)

 Written by [cubesys](https://www.cubesys.com.au/blog/author/cubesys) | Aug 6, 2020 2:00:00 PM

Recently I had to update the configuration of an existing Azure AD Connect – the directly synchronization tool from Microsoft to synchronize your Active Directory identities to Azure AD – instance.

It was running the latest version at that time (1.5.42).

The error was:

> An error occurred while connecting to the state store: Attempted to perform an unauthorized operation

It did not matter which type of configuration update I tried, I was always getting the error after completing the Azure AD Connect configuration wizard (when clicking the **Configure** button at the last step ‘**Ready to configure**’).

Then I noticed that a new version was released (1.5.45), s before further investigation and obviously opening a service request I upgraded the instance but still no luck.

It ended to be a **permission issue** on on file used by Azure AD Connect (**PersistedState.xml** located in **C:ProgramDataAADConnect**)

To fix the issue, first **take ownership** of the file and then edit the permission to grant the Azure AD Connect service account full control.

Then you can run again the wizard to update your configuration and…Tada! Issue fixed.

[View full post](https://www.cubesys.com.au/blog/azure-ad-connect-getting-an-error-occurred-while-connecting-to-the-state-store-error-after-updating-aad-connect-configuration)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "cubesys"
  },
  "dateModified" : "2025-02-21T16:26:10.836Z",
  "datePublished" : "2020-08-06T14:00:00Z",
  "headline" : "Azure AD Connect – Getting “An error occurred while connecting to the state store” error after updating AAD connect configuration",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.cubesys.com.au/blog/azure-ad-connect-getting-an-error-occurred-while-connecting-to-the-state-store-error-after-updating-aad-connect-configuration",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Latest News"
  }
}
```