locked
SharePoint AD Groups using Silverlight RRS feed

  • Question

  • I have a silverlight application that is hosted within SharePoint 2010.
    Within the application I need to check to see if the current logged in user is in a specific SharePoint Security Group.
    The SharePoint Security Group contains an AD Group (not individual users)

    IE The SharePoint Group:SiteMembers contains the AD Group of SPSiteAdmins

    I need to check if the current user is a member of the AD Group SPSiteAdmins

    Is there a way to do this within Silverlight?


    Lou

    Thursday, February 16, 2012 7:49 PM

Answers

  • The SharePoint Server OM supports checking the groups using the SPWeb.IsCurrentUserMemberOfGroup method. This method is not available in the Client OM. 

    You could determine permissions for the current user server side and use init params to load the application in different states. You will be able to by pass the security easily. The other approuch would be to create your own web service and verify if the user is in the group.


    SharePoint Developer | @zeemanj | Blog

    Thursday, February 16, 2012 9:44 PM

All replies

  • SharePoint supports other methods to check if the user has a certain permission level. The SharePoint Client OM supports the Web.DoesUserHavePermission method. Site owners will have Full Control on the site. This will be the easiest method to determine the access level of the users. 


    SharePoint Developer | @zeemanj | Blog

    Thursday, February 16, 2012 8:08 PM
  • Thanks Jeffery, but I need to ensure that the user exists in the Active Directoy group.

    I am able to retrieve a list of users in a particular SharePoint Security Group, I have 2 Users and 1 AD Security Group in the SP security Group

    SP Group: Admins

    Member: SPSiteAdmins <-- This is the AD Security Group. I need to ensure that the current user is a member of this AD group.


    Lou

    Thursday, February 16, 2012 9:15 PM
  • The SharePoint Server OM supports checking the groups using the SPWeb.IsCurrentUserMemberOfGroup method. This method is not available in the Client OM. 

    You could determine permissions for the current user server side and use init params to load the application in different states. You will be able to by pass the security easily. The other approuch would be to create your own web service and verify if the user is in the group.


    SharePoint Developer | @zeemanj | Blog

    Thursday, February 16, 2012 9:44 PM
  • Ah I believe this poses another problem, I forgot to mention that the SharePoint 2010 Environment is an Office 365 Environment, so I don't think I can create a web service there, but perhaps I could host this web service inside my domain.


    Lou

    Friday, February 17, 2012 12:38 PM
  • Hi Lou,

    If it's sn Office 365 issue, please post you question to Office 365 forum, and here is the link:http://community.office365.com/en-us/f/default.aspx


    Wayne Fan

    TechNet Community Support

    Thursday, February 23, 2012 11:49 AM