DBgroup membership of a ADuser member of an ADgroup declared as DBuser

  • Hi all.

    We are migrating an application from SQL2000 to SQL2005 and changing the authentication mode from SQL to windows integrated.

    The application accepts SSI credentials, but behaves wrong because need to know the role membership of the user to show the menus.

    Seems to use sp_helpuser to know the DBrole for the DBuser,

    select suser_name() returns the ADuser name but the ADuser being member of an ADgroup declared as DBuser returns nothing when using sp_helpuser.

    If we give sp_helpuser the ADgroup name, returns the needed value in the GroupName column.

    So, is there any way to know the ADgroup membership for a ADuser?

    The application vendor wants me to declare manually each ADuser as login, DBuser and DBrole member!!!!

    Any idea would be appreciated.

  • With the nesting of AD groups I've seen flaky behavior using such methods. One workaround that we've used is to take the Windows groups and make them members of the appropriate database roles and then look against the database roles themselves.

    K. Brian Kelley
    @kbriankelley

  • Hi Brian. thank you for your reply.

    We have done that you suggest. The active directory groups are members of the database roles, but we only have the user credentials. How can we query the roles if we have not the name of the active directory group?

  • Use the IS_MEMBER() function.

    K. Brian Kelley
    @kbriankelley

  • Thank you, I'll try and tell you somethig about.

  • Hi Brian.

    IS_MEMBER() is like magic for my eyes!!

    THEY will not have more excuse....

    I'll try do someone to reprogram something to use it and cross my fingers to have the program modified instead do the things in the bad way.

    Thanks a lot.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply