# Delegating Active Directory attribute physicalDeliveryOfficeName

Being responsible for Active Directory you’re often tasked with fairly simple task of delegating permissions for user and groups. After…

blog

17 Aug 2016 pl

![Delegating Active Directory attribute physicalDeliveryOfficeName](/wp-content/uploads/2016/08/activedirectory.png)

[Zobacz obrazy (14)](#pf-content-image-1-0)

Being responsible for **Active Directory** you're often tasked with fairly simple task of **delegating permissions** for user and groups. After doing it multiple times you know how to do it, but then you're told to delegate only one attribute **physicalDeliveryOfficeName** and things get complicated.

### ❗ Problem Description

Normally delegating attributes in Active Directory is simple walk in a park.

- You open up **Active Directory Users and Computers**

[!\[Konsola Active Directory Users and Computers z zaznaczonym drzewem domeny\](/wp-content/uploads/2016/08/img_57b4d1951938c.png)](/wp-content/uploads/2016/08/img_57b4d1951938c.png)

- Right click on click on root of the domain or the object you want to delegate permissions on choose **Delegate Control…**

[!\[Opcja Delegate Control wybrana z menu kontekstowego Active Directory\](/wp-content/uploads/2016/08/img_57b4d12f450db.png)](/wp-content/uploads/2016/08/img_57b4d12f450db.png)

- Follow **Delegation of Control Wizard**

[!\[Ekran powitalny kreatora Delegation of Control w Active Directory Users and Computers\](/wp-content/uploads/2016/08/img_57b4d1c0f10a7.png)](/wp-content/uploads/2016/08/img_57b4d1c0f10a7.png)

- Select **User or Groups** to **delegate permissions** to (obviously choose Groups)

[!\[Krok Users or Groups w kreatorze delegowania z wybraną grupą\](/wp-content/uploads/2016/08/img_57b4d1f5dbf65.png)](/wp-content/uploads/2016/08/img_57b4d1f5dbf65.png)

- Choose **Create a custom task to delegate**

[!\[Opcja Create a custom task to delegate w kreatorze delegowania\](/wp-content/uploads/2016/08/img_57b4d2287bcae.png)](/wp-content/uploads/2016/08/img_57b4d2287bcae.png)

- Choose **Only the following objects in the folder**, and select **User objects**

[!\[Kreator delegowania ustawiony na obiekty User objects w wybranym folderze\](/wp-content/uploads/2016/08/img_57b4d24b04def.png)](/wp-content/uploads/2016/08/img_57b4d24b04def.png)

- And then, uncheck **General**, choose** Property-Specific** and find your precious property such as **physicalDeliveryOfficeName** that you were looking for on the list.

[!\[Lista uprawnień Property-Specific bez widocznego atrybutu physicalDeliveryOfficeName\](/wp-content/uploads/2016/08/img_57b4d2bd13b37.png)](/wp-content/uploads/2016/08/img_57b4d2bd13b37.png)

- The only problem… it's not on the list. So you cancel, and go for the more direct approach.. modifying **security properties** directly.

[!\[Okno Properties obiektu Active Directory otwarte do bezpośredniej edycji zabezpieczeń\](/wp-content/uploads/2016/08/img_57b4d333b49e8.png)](/wp-content/uploads/2016/08/img_57b4d333b49e8.png)

- You choose **Properties, **go to **Security **tab and press **Advanced**.

[!\[Karta Security właściwości obiektu Active Directory z podświetlonym przyciskiem Advanced\](/wp-content/uploads/2016/08/img_57b4d38ea525a.png)](/wp-content/uploads/2016/08/img_57b4d38ea525a.png)

- Then you choose **Add** permission, you choose your **principal group**, you choose **Type** to **Allow**, **Applies to**: **Descendant User objects**… finally you uncheck not needed permissions, and then you find there's no such field as **physicalDeliveryOfficeName **on that list!

[!\[Zaawansowane uprawnienia dla podrzędnych obiektów użytkownika bez pola physicalDeliveryOfficeName\](/wp-content/uploads/2016/08/img_57b4d41c1c9be.png)](/wp-content/uploads/2016/08/img_57b4d41c1c9be.png)

### ✅ Solution

As bad as it sounds I was really stomped. Either I am blind or something is seriously missing. It turns out it is missing and unless you enable it it's gonna stay invisible. The solution is quite simple:

- Close all instances of **Active Directory Users and Computers**
- Open **Windows Explorer** and go to **C:\Windows\System32** and find **dssec.dat** file

[!\[Eksplorator Windows otwarty w C:\Windows\System32 z widocznym plikiem dssec.dat\](/wp-content/uploads/2016/08/img_57b4d505cb9ae.png)](/wp-content/uploads/2016/08/img_57b4d505cb9ae.png)

- Make yourself a copy of that file in case things get ugly. The file holds settings for each value for that is supposed to be **filtered out** of **delegation/security** tabs.

[!\[Zawartość pliku dssec.dat pokazująca filtrowane ustawienia atrybutów Active Directory\](/wp-content/uploads/2016/08/img_57b4d55863ac4.png)](/wp-content/uploads/2016/08/img_57b4d55863ac4.png)

- Find** [user]** section (or any section you want that property to be visible at and change **physicalDeliveryOfficeName=7** to **physicalDeliveryOfficeName=0.**
- Now open up **Active Directory Users and Computers** and it should be there… although not in the form you expected it. The property is called **Office Location**.

[!\[Właściwość Office Location widoczna na liście uprawnień po zmianie w dssec.dat\](/wp-content/uploads/2016/08/img_57b4d94947510.png)](/wp-content/uploads/2016/08/img_57b4d94947510.png)

- And if you're wondering now if it was there all along.. well I did wonder myself so I've checked on different **AD** **controller**… and as you can see below it's not there.

[!\[Lista uprawnień na innym kontrolerze domeny, gdzie Office Location nadal nie jest widoczne\](/wp-content/uploads/2016/08/img_57b4d9e231ce7.png)](/wp-content/uploads/2016/08/img_57b4d9e231ce7.png)

### 📝 Notes

The **Per-Property Permissions tab** for a user object that you view through **Active Directory Users and Computers** may not display every property of the user object. This is because the user interface for access control filters out object and property types to make the list easier to manage. While the properties of an object are defined in the schema, the list of filtered properties that are displayed is stored in the **Dssec.dat** file that is located in the **%systemroot%\System32** folder on all domain controllers. You can edit the entries for an object in the file to display the filtered properties through the user interface. A filtered property looks like this in the **Dssec.dat** file:

> [User] propertyname=7

To display the **read and write permissions** for a property of an object, you can edit the filter value to display one or both of the permissions. To display both the read and write permissions for a property, **change the value to zero (0)**:

> [User] propertyname=0

To display **only the write permission** for a property, **change the value to 1**:

> [User] propertyname=1

To display **only the read permissions** for a property, **change the value to 2**:

> [User] propertyname=2

After you edit the **Dssec.dat** file, you must quit and restart **Active Directory Users and Computers** to see the properties that are no longer filtered. The file is also machine specific so changing it on one machine doesn't update all others. It's up to you whether you want it visible everywhere or not.

## Powiązane projekty

Projekty powiązane z tagami, kategoriami i treścią tego wpisu.

[Wszystkie projekty](/projekty/)

Trwa dopasowywanie projektów...

[Powrót do bloga](/blog/)

## Powiązane wpisy

- [Check an API write after a PowerShell timeout](/blog/verify-uncertain-api-outcomes-powershell/)
- [Inspect and convert mixed Office archives with PSWriteOffice](/blog/inspect-and-convert-mixed-office-archives-pswriteoffice/)
- [Compose PDF reports and automate page workflows with PSWriteOffice](/blog/automate-pdf-reports-and-page-workflows-pswriteoffice/)

<!-- PowerForge markdown artifact sha256:7F63DEC91F79AF40A9BA24705AFFF7F5F3B2CF132125004CBAFC25A589837FB2 -->
