1
사용자를 Active Directory 내의 다른 조직 구성 단위로 이동하려고하면 System.UnauthorizedAccessException {"Access is denied."}
오류가 발생합니다.Active Directory에서 사용자를 OU로 이동하십시오. (액세스 거부 오류)
아래 코드는 제가 사용하고있는 코드입니다. MoveTo
로 전화하면 오류가 발생합니다. MoveTo
에 대한 호출을 주석 처리하면 CommitChanges
이 호출되면 사용자 전화 번호가 성공적으로 업데이트되어 권한 오류가 아닐 수 있습니다.
사용자가 새로운 OU로 사용자를 이동할 수없는 이유는 무엇입니까?
Try
Using Entry As DirectoryEntry = GetDirectoryEntry(DomainLogin) 'Retrieves the directory entry for the user.
Entry.Properties("telephoneNumber").Value = "9999999" 'This successfully changes the user's phone number
Dim strUserPass As String() = nBase.oAppControl.GetADUsernameAndPassword()
'Create DirectoryEntry for the target OU
Dim newLocation As DirectoryEntry = New DirectoryEntry("LDAP://testgrp.local/OU=Accounts,DC=local", strUserPass(0), strUserPass(1))
Entry.MoveTo(newLocation) 'Throws exception
Entry.CommitChanges()
Return True
End Using
Catch ex As Exception
Return False
End Try
'strUserPass'와 함께 전달 된 자격증 명에 사용자 이동 권한이 있습니까? –
GUI를 통해 사용자를 이동할 수 있습니까? Active Directory 사용자 및 컴퓨터 콘솔처럼? –
내일 권한을 다시 확인하고 Windows를 통해 시도해 보겠습니다. 'strUserPass'에 대한 자격 증명은 전화 번호가 변경되도록합니다 - 사용자를 OU로 옮길 수있는 별도의 허가가 있습니까? 응답 주셔서 감사합니다 –