Options

Windows Group Member / Active Directory Groups

AntHillMobAntHillMob Member Posts: 79
edited 2011-05-11 in NAV Three Tier
I have an integration that uses a web service. As part of this I need to determine if the user is part of an AD group.

I thought I could do this using the 'Windows Group Member' virtual table as this works perfectly querying it with a codeunit in the classic client. When using on the RTC or via a web service this virtual table is empty so this approach will not work. :cry:

I have found a piece of standard MS code in Codeunit 8705 but I can't get that to work either. Any suggestion on how to achieve this [-o<

Answers

  • Options
    ufukufuk Member Posts: 514
    I haven't required this in Navision but in C# there are lots of post explaining how to obtain the AD group a user belongs to as:

    http://stackoverflow.com/questions/2188954/see-if-user-is-part-of-active-directory-group-in-c-asp-net
    Ufuk Asci
    Pargesoft
  • Options
    jglathejglathe Member Posts: 639
    Hi AntHillMob,

    you might try out the virtual table "User SID", this contains all SIDs of the groups the user belogs to. And the SID of the user itself. But it only contains the SIDs for the user who has logged on. The table is documented on MSDN under "Special NAV Tables". Works beautifully here.

    with best regards

    Jens
  • Options
    AntHillMobAntHillMob Member Posts: 79
    Thanks for the replys.

    The USER SID table work great until I tried to use a web service. The C# approach works great but is an overhead to install an additional component. (This installation is not R2). Finally cracked this one by using the extended strored procedures in SQL server with a ADO connection.
  • Options
    kinekine Member Posts: 12,562
    If the installation is SP1 and not R2, it is just about implementing platform hotfixes to have the R2 instead SP1 with all the possibility to use DotNet...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.