Read Only Attribute

Hi Team. 

I am trying to blank \ remove the value in the edsvaAzureObjectId attribute. I am able to do this via the MMC but when i try via Powershell i get the error below. Ultimately i need to run this command on all user accounts as it fixing a problem with the backsync. 

Any ideas? 

WARNING: Attributes edsvaAzureObjectId/edsvaAzureOffice365Enabled are read only. Cannot be modified.

Connect-QADService -Service "SERVER-FQDN" -Proxy
Set-QADUser -IncludedProperties 'edsvaAzureObjectId' -Identity SamAccountName-Here -ObjectAttributes @{"edsvaAzureObjectId"=" "}

Parents Reply Children
  • In following with the spirit of using the ADSI provider instead of the QAD cmdlets, the following should work:

    $searcher = [adsisearcher]::new()
    $searcher.SearchRoot = [adsi]("EDMS://CN=Active Directory")
    $searcher.SearchScope = "Subtree"
    $searcher.Filter = '(&(objectClass=user)(edsvaAzureObjectId=*))'
    $searcher.PageSize = 1000
    $results = $searcher.FindAll()
    @(
        "objectGuid",
        "distinguishedName"
    ).ForEach{
        $null = $searcher.PropertiesToLoad.Add($_)
    }
    
    $results.ForEach{
        $adUser = [adsi]("EDMS://<GUID=" + ([guid]$_.Properties.Item("objectGuid")[0]).Guid + ">")
    
        if ($null -ne $adUser.NativeGuid) {
            $null = $adUser.Properties["edsvaAzureObjectId"].Clear()
            $null = $adUser.CommitChanges()
    
            $null = $adUser.Dispose()
        }
    }

  • Thank you Shawn. Really appreciate that. It did work in the end using my original method. The issue was that there was something going on with our DB since version 8.1 and i guess its one of a few reasons as to why Quest have removed 8.1 for the time being.