Kentico / ADImport

Kentico Xperience Active Directory Import Utility is an application which allows importing of users and groups (roles) from Active Directory into Kentico Xperience.
https://www.xperience.io
MIT License
3 stars 2 forks source link

Kentico AD Import Utilty query #7

Closed spwatsondit closed 5 years ago

spwatsondit commented 7 years ago

UPDATE 03/08/2016 16:24PM GMT

We have made some updates to our database in relation to the users and roles, but we are now seeing another message from the AD import process. I have created a new issue for this.

Kind regards,

Stephen Watson

Hi,

I'm not sure if you are the correct contact to approach about this issue, but we are currently using the Kentico Active Directory Import Utility to import users from a remote server into a Kentico website, but when we run the import we are seeing following error:

[2017-08-02 15:17:36] Error occurredMessage: The server is not operational.

Stack Trace: at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRefHelper(Type principalType, String urnScheme, String urnValue, DateTime referenceDate, Boolean useSidHistory) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRef(Type principalType, String urnScheme, String urnValue, DateTime referenceDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable1 identityType, String identityValue, DateTime refDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue) at ADImport.ADProvider.Exists(Object objectIdentifier) in D:\ADImport-10.0.0\ADImport-10.0.0\ADImport\ADProvider.cs:line 1414 at lambda_method(Closure , RoleInfo ) at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at ADImport.CMSImport.DeleteNonExistingObjects(CumulatedChanges usersChanged, CumulatedChanges rolesChanged) in D:\ADImport-10.0.0\ADImport-10.0.0\ADImport\CMSImport.cs:line 980 at ADImport.CMSImport.ImportWorker_DoWork(Object sender, DoWorkEventArgs e) in D:\ADImport-10.0.0\ADImport-10.0.0\ADImport\CMSImport.cs:line 368 The server is not operational.

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRefHelper(Type principalType, String urnScheme, String urnValue, DateTime referenceDate, Boolean useSidHistory)

Looking through the code, it seems to be breaking in the ADImport.cs at line 980 (the code extract has been attached), which seems to be the point where the deletion of CMS (domain) roles that do not exist in AD anymore. The utility can connect to the remote server fine, so we can select the user groups and users to import, but when attempting the import itself, it shows the above message.

Is this something you can help with?

Thank you.

Kind regards,

Stephen Watson Discover IT UK

CMSImport.zip

petrsvihlik commented 7 years ago

@MarecekF @ZdenekS81 Can you guys please make someone from the platform team have a look?

spwatsondit commented 7 years ago

Hi,

In relation to the query above, we have cleared out any erroneous roles and users that were previously imported during our local AD import testing, and have rerun the utility. We are now seeing the following:

[2017-08-03 15:10:23] Importing role 'ARM_DOM\Kentico Users' to site 'Adventist Risk'... [2017-08-03 15:10:33] Error occurredMessage: The server is not operational.

Stack Trace: at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRefHelper(Type principalType, String urnScheme, String urnValue, DateTime referenceDate, Boolean useSidHistory) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRef(Type principalType, String urnScheme, String urnValue, DateTime referenceDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue) at System.DirectoryServices.AccountManagement.GroupPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue) at ADImport.ADProvider.GetUsersOf(IPrincipalObject group) in D:\ADImport-10.0.0\ADImport-10.0.0\ADImport\ADProvider.cs:line 1239 at ADImport.CMSImport.ImportWorker_DoWork(Object sender, DoWorkEventArgs e) in D:\ADImport-10.0.0\ADImport-10.0.0\ADImport\CMSImport.cs:line 425 The server is not operational.

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRefHelper(Type principalType, String urnScheme, String urnValue, DateTime referenceDate, Boolean useSidHistory)

It looks as though it is trying to import the ARM_DOM\Kentico Users group, but it is failing. What could be causing this?

Thank you

Kind regards

Stephen

spwatsondit commented 6 years ago

Hi,

Are there any suggestions for the query I have entered here? We need to find a solution for this, thank you.

Kind regards,

Stephen

petrsvihlik commented 6 years ago

Hi, afaik @ZdenekS81 is on it... let's wait for an update from him.

ZdenekS81 commented 5 years ago

Hi Stephen,

are errors from your comments still present or have you been able to solve them, please?

Best regards, Zdenek