You are viewing limited content. For full access, please sign in.

Question

Question

Its possible get domain accounts for LFDatabase from sdk laserfiche ?

asked on March 11, 2014

Hi.

 

I can through the sdk  get the users with the method GetAllUsers. For example:

 
ILFCollection coleccionUsuarios = (ILFCollection) baseDatos.GetAllUsers (); 


its possible get the domain accounts via sdk the laserfiche? 

 

Because I have Laserfiche 
users (ok) 
groups (ok) 
domain accounts (?) (how?)

 

thanks for help.

 

=======================================

El sdk laserfiche tengo metodos para obtener los usuarios y los grupos

registrados, es posible obtener las cuentas de dominios registradas

en el laserfiche a través del sdk?

 

Normalmente en laserfiche maneja el concepto de :

usuario, grupo y cuentas de dominio, pero solo veo en los metodos

asociados a la LFDatabase como GetAllUsers(), etc.

 

Algun tip?

Gracias. por la ayuda

0 0

Answer

SELECTED ANSWER
replied on March 12, 2014

I do not know if it is the best or even correct way, but this is the only way I know of to get a list of domain accounts that are defined in a repository:

                Dim DAC As LFSecuredDomainAccountCollection = LFDB.SecuredDomainAccounts
                For Each DomAccount As LFDomainAccount In DAC
                    If DomAccount.IsUser Then
                        ' This is a domain user
                        ' Do work here
                    End If
                Next

 

0 0
replied on March 12, 2014

Thanks Bert Warren

 

I do not know if it is the best or even correct way. I use C#

Imagine is another alternative. But, I find a method I do not documented in Laserfiche :

get_SecuredDomainAccountsEx(int preloadFlags)

method of LFDatabase.

 

What is preloadFlags? 

I use preloadFlags=1, I was lucky , work fine, but could be 0, 1, etc.

 

Code C#:


 

// Cuenta de dominios 
//(Acceden a 
// traves active directory)
// baseDatos = LFDatabase

LFSecuredDomainAccountCollection 
cuentasActiveDirectory = 
baseDatos.get_SecuredDomainAccountsEx(1); 

// Porque 1 ? este metodo no se encuentra documentado.

for (int numero = 1; numero <= 
cuentasActiveDirectory.Count; numero++)
{
  // cuenta de dominio
  LFDomainAccount u = 
  (LFDomainAccount)cuentasActiveDirectory.Item[numero];

  // Mostrar 
  System.Console.Writeline(u.Name);

}             

 
0 0

Replies

replied on March 11, 2014

This in C#?

 

http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C

 

That should help you out. You might want to bypass the whole Laserfiche architecture and go straight to the domain accounts. It should be faster and more accurate. The only issue you might find is if you try to find someone that is a user but not a Laserfiche user and wanted to assign them rights. That would cause a problem but otherwise, you should be fine to use that users information.

0 0
replied on March 11, 2014

Ok. Yes is C#

But not from C# with dlls C# if not from dlls sdk laserfiche (using LFSO83Lib)

 

for example from sdk laserfiche :

ILFCollection coleccionUsuarios = (ILFCollection) baseDatos.GetAllUsers (); 

 

now, for get domain account, exits some method?

basedatos.get... ?

 

Not want to bypass the whole Laserfiche architecture and go straight to the domain accounts

 

Thanks.

0 1
You are not allowed to follow up in this post.

Sign in to reply to this post.