You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/windows-server/active-directory/cannot-edit-delete-ad-object-error-sam.md
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Can't edit or delete an AD object and receive errors
3
-
description: Helps resolve the issue in which you can't edit or delete an Active Directory (AD) object and receive an error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist."
4
-
ms.date: 03/04/2025
2
+
title: Can't Edit or Delete an AD Object and Receive Errors
3
+
description: Helps resolve an issue where you can't edit or delete an AD object and receive the error Attribute is owned by SAM or The specified account does not exist.
4
+
ms.date: 03/10/2025
5
5
manager: dcscontentpm
6
6
audience: itpro
7
7
ms.topic: troubleshooting
@@ -12,15 +12,15 @@ ms.custom:
12
12
---
13
13
# Can't edit or delete an AD object and receive error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist"
14
14
15
-
This article helps resolve the issue in which you can't edit or delete an Active Directory (AD) object and receive an error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist."
15
+
This article helps resolve an issue in which you can't edit or delete an Active Directory (AD) object and receive the error "attribute is owned by the Security Accounts Manager (SAM)" or "The specified account does not exist."
16
16
17
-
You have a user, Managed Service Account (MSA), Group Managed Service Account (gMSA), computer or group object that is in use. When you attempt to delete a security principal from AD, you receive the following Lightweight Directory Access Protocol (LDAP) error:
17
+
You have a user, Managed Service Account (MSA), Group Managed Service Account (gMSA), computer, or group object that is in use. When you attempt to delete a security principal from AD, you receive the following Lightweight Directory Access Protocol (LDAP) error:
18
18
19
19
> Operation failed. Error code: 0x525
20
20
The specified account does not exist.
21
21
00000525: NameErr: DSID-031A120B, problem 2001 (NO_OBJECT), data 0, best match of
22
22
23
-
When you retrieve properties of a computer object by using the following cmdlet:
23
+
When you retrieve the properties of a computer object by using the following cmdlet:
@@ -56,11 +56,11 @@ From the output, you notice an attribute excerpt and some key details:
56
56
- The `objectCategory` attribute is shown as empty.
57
57
- The `sAMAccountType` attribute isn't listed.
58
58
59
-
When you try to edit the object, this error appears for most of the changes:
59
+
When you try to edit the object, this error appears for most changes:
60
60
61
61
> 0x209a Access to the attribute is not permitted because the attribute is owned by the Security Accounts Manager (SAM).
62
62
63
-
When you check the metadata with the distinguished name (DN) get from the preceding output (excerpts of the attribute list) by using the following command, you receive unexpected results:
63
+
When you check the metadata with the distinguished name (DN) obtained from the preceding output (excerpts of the attribute list) by using the following command, you receive unexpected results:
@@ -77,20 +77,20 @@ Here's the interpretation of the metadata:
77
77
78
78
- The `sAMAccountType` and `objectCategory` attributes
79
79
- They're usually set once.
80
-
- The version is `2`, and they aren't set at this time. So they were removed during the object deletion, and weren't repopulated during the undeletion.
80
+
- The version is `2`, and they aren't set at this time. So, they were removed during the object deletion and weren't repopulated during the undeletion.
81
81
- The `isDeleted` attribute
82
82
- The version also shows `2`. This means the object was deleted and was undeleted by clearing the attribute.
83
83
- If the object was revived using an authoritative restore, the version numbers for all attributes would be higher (the default version increase is 100000).
84
84
- The `isRecycled` attribute
85
-
- It shows that at least at the time of the undeletion, Active Directory (AD) Recycle Bin wasn't enabled.
86
-
-With AD Recycle Bin, the attribute would only be set on a recycled object.
85
+
- It shows that at least at the time of the undeletion, the Active Directory (AD) Recycle Bin wasn't enabled.
86
+
-When using the AD Recycle Bin, the attribute would only be set on a recycled object.
87
87
- Expected behaviors
88
-
- If the undeletion worked as expected, the version of `sAMAccountType` and `objectCategory` would be an odd value (for example, `3`)
88
+
- If the undeletion worked as expected, the version of `sAMAccountType` and `objectCategory` would be an odd value (for example, `3`).
89
89
- The timestamp for these attributes would match or be slightly newer than the timestamp for `IsDeleted`.
90
90
91
91
## The sAMAccountType and objectCategory attributes aren't added to the object in an undeletion process
92
92
93
-
The object was deleted and undeleted. Deleted objects don't have the `sAMAccountType` and `objectCategory` attributes. They're added to the object after the undeletion in the normal case. In the problem case, the process fails, leaving the object live without these key attributes. This state of the object is a known problem that can't be reproduced, and the root cause for this sporadic problem hasn't been identified.
93
+
The object was deleted and undeleted. Deleted objects don't have the `sAMAccountType` and `objectCategory` attributes. They're added to the object after the undeletion in the normal case. In the problem case, the process fails, leaving the object active without these key attributes. This state of the object is a known problem that can't be reproduced, and the root cause of this sporadic problem hasn't been identified.
94
94
95
95
## Use the fixupObjectState attribute with LDIFDE to repair the object
96
96
@@ -104,14 +104,14 @@ To resolve this issue, use the new facility included in Windows Server 2025 to
104
104
> [!NOTE]
105
105
> There's also functionality to repair the `LastLogonTimeStamp` attribute. For more information, see [Will update link to the new article for this attribute].
106
106
107
-
### Step 1: Identify the object name and the globally unique identifier (GUID)
107
+
### Step 1: Identify the object name and globally unique identifier (GUID)
### Step 2: Prepare an LDIFDE import file with the DN string or the GUID-based syntax
114
+
### Step 2: Prepare an LDIFDE import file using the DN string or GUID-based syntax
115
115
116
116
- Use the DN string:
117
117
@@ -124,7 +124,7 @@ For example:
124
124
```
125
125
126
126
> [!NOTE]
127
-
> The line with only "-" and the empty line are required for a well-formed LDIFDE import file. This example requests to repair both SAMrelevant attributes.
127
+
> The line with only a hyphen (`-`) and the empty line are required for a well-formed LDIFDE import file. This example requests the repair of both SAM-relevant attributes.
128
128
129
129
- Use the GUID-based syntax:
130
130
@@ -134,7 +134,7 @@ For example:
134
134
135
135
So, the expression of `fixupObjectState: cn=brokenuser,ou=bad-users,dc=contoso,dc=com:Objectcategory, SamAccountType` becomes `fixupObjectState: <guid=cf2b4aca-0e67-47d9-98aa-30a5fe30dc36>:Objectcategory, SamAccountType`.
136
136
137
-
To use this syntax with the LDIFDE import file, the text after the first colon needs to be encoded in Base64 format because of the greater-than (>) and less-than (<) signs:
137
+
To use this syntax with the LDIFDE import file, you need to encode the text after the first colon in Base64 format because of the greater-than (>) and less-than (<) signs:
> The double colon tells LDIFDE that the attribute value is in Base64 format. You can use the [Base64 encoder](https://www.bing.com/search?q=site%3Amicrosoft.com%20base64%20encoder&qs=n&form=QBRE&sp=-1&lq=0&pq=site%3Amicrosoft.com%20base64%20encoder&sc=0-33&sk=&cvid=CE994D44ADFC432CA2D3784CEBB3D934&ghsh=0&ghacc=0&ghpl=) to encode the string directly on the web.
145
145
146
-
With the Base64 format used, the import file updates the attributes individually:
146
+
After using the Base64 format, the import file updates the attributes individually:
147
147
148
148
- For the `sAMAccountType` attribute:
149
149
@@ -165,7 +165,7 @@ For example:
165
165
-
166
166
```
167
167
168
-
### Step 3: Repair the object with LDIFDE
168
+
### Step 3: Repair the object using LDIFDE
169
169
170
170
Sign in as an Enterprise Administrator, and import the LDIFDE import file with the following command by specifying the import file name (for example, **repair-user.txt**):
171
171
@@ -182,4 +182,4 @@ Then, the `objectCategory` and `sAMAccountType` attributes of the object are rep
182
182
183
183
### Step 4: Delete the object again
184
184
185
-
Delete the object again, as the algorithm doesn't ensure the `sAMAccountType` attribute is correct for all cases. SAM allows a deletion with the new state of the object, but other operations with the object might fail. Additionally, the object might miss other crucial attributes for it to function properly.
185
+
Delete the object again, as the algorithm doesn't always ensure the `sAMAccountType` attribute is correct. SAM allows the object in the new state to be deleted, but other operations on the object might fail. Additionally, the object might lack other crucial attributes that make it function properly.
0 commit comments