Sharepoint 2010 get User Groups from specific site

Hello,
I was able to get all User groups from entire site Collection.
But instead of getting user groups from entire site, I want read user groups only from one specified sub site.
Please help!
Thanks

Assuming you have an SPWeb object named "web", example:
SPSite site = new SPSite(http://yourdomain/sites/yoursite);
SPWeb web = site.OpenWeb("mysubsite/subsbusite");
web.Groups will return a collection of SPGroup objects for the current subsite. If this subsite inherits permissions from a parent site (web.HasUniquePerm = False), the list is the same as the Groups property of the parent site.
SPWeb.Groups:
http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb.groups(v=office.15).aspx
SPGroup:
http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spgroup(v=office.15).aspx
You would be better results by posting coding questions in "SharePoint 2010 - Development and Programming" instead of "SharePoint 2010 - General Discussions and Questions".
Mike Smith TechTrainingNotes.blogspot.com
Books:
SharePoint 2007 2010 Customization for the Site Owner,
SharePoint 2010 Security for the Site Owner

Similar Messages

  • Read user groups from realm. Admin rights to each user ??

    Greetings to ALL,
    I am reading users, groups from realm. If I give the user admin priviliges I am
    able to get the information else I get the error weblogic.management.NoAccessRuntimeException:
    Access not allowed for subject: principals=[ruser1, B10AP01, B10MP01, B10MP03A,
    B10MP03], on ResourceType: Security:Name=myrealmDefaultAuthenticator Action: execute,
    Target: listGroups
    Is there more effective way to read the information.
    I can execute the program standalone ( from DOS PROMPT) and read all information
    if I do the following
    adminHome = (MBeanHome) Helper.getAdminMBeanHome (username,password,url);
    But when calling from the application I get the above error.
    Any code, suggestion will be very helpful.
    Fred

    "Fred Boon" <[email protected]> wrote in message
    news:3fa7cb98$[email protected]..
    >
    Greetings to ALL,
    I am reading users, groups from realm. If I give the user admin priviligesI am
    able to get the information else I get the errorweblogic.management.NoAccessRuntimeException:
    Access not allowed for subject: principals=[ruser1, B10AP01, B10MP01,
    B10MP03A,> B10MP03, on ResourceType: Security:Name=myrealmDefaultAuthenticatorAction: execute,
    Target: listGroups
    Is there more effective way to read the information.
    Commo mbeans require admin role in order to be able to invoke methods.
    I can execute the program standalone ( from DOS PROMPT) and read allinformation
    if I do the following
    adminHome = (MBeanHome) Helper.getAdminMBeanHome (username,password,url);
    But when calling from the application I get the above error.
    Try doing a runAs with a subject that has admin role.

  • Migrate the users, groups from essbase 7.1.6 to shared services

    Hi
    Our current production is essbase version 7.1.6 and we are planning to migrate to EPM 11.1.2 . We would like to move the security administration from Essbase to Shared Services (want to use Native Directory).
    can somebody please suggest
    1) An utility that Oracle provides with EPM 11.1.2 that helps to migrate the users and groups from 7.1.6 to shared services?
    2) After bringing the users groups from 7.1.6 to 11.1.2, do we need to externalize these users and groups or no need?
    Appreciate the help. Thanks,

    if you have LDAP/MSAD try to configure it first .That will get your users
    Now using maxl
    spool on to GROUP.txt
    display gruoup all;
    spool on to USER.txt
    display user in group all;
    for test purpose create a test group and a test user from the shared services.
    Now using GROUP.txt
    make up maxl statements to create groups(use any advanced text editor or MS excel to get your work done fast)
    create group 'groupname';
    now login into that shared services
    go to FOundation Application group->click sharedservices->drop down native directory ->Right click on Groups and select export for edit.THat will save you Groups.csv file.
    Now
    1.Open that Groups.csv file
    2.Using USER,txt ,paste the users in that file under their respective group.(Look for test group created that should give you an idea!!!)
    3.Paste user correctly and save it to the same file Groups.csv
    4.go to FOundation Application group->click sharedservices->drop down native directory ->Right click on Groups and select IMPORT for edit.
    5.that will get your users into the groups.
    ________filters_______
    Using maxl again
    spool on to FILTER.txt
    display filter row all;
    spool on to GRPRIVILEGE.txt
    display privilege group all;
    Now using FILTER.txt
    create maxl statements
    (use any advanced text editor or MS excel to get your work done fast)
    Ex: create filter app.database.filtername read/write/none/metaread on 'AREA ' ;
    Using GRPRIVILEGE.txt
    create maxl statements
    grant filter app.databse.filtername to 'groupname';
    that should get your filters created and assigned.
    else you can use Advanced Security Manger
    http://www.appliedolap.com/free-tools/advanced-security-manager
    hope that should give you an idea!!!!!!!

  • Get all groups from an AD Server

    Hi everyone,
    I'm trying to get all groups from and AD server.
    Here's how I'm doing it:
    DirContext ctx = new InitialDirContext( (Hashtable<String,String>) env);
              Name n2 = new CompositeName().add(groupsContainer);
              NamingEnumeration<Binding> contentsEnum = ctx.listBindings(n2);
              int i = 1;
              while ( contentsEnum.hasMore() && (i++) < 1000 )
                   Binding binding = contentsEnum.next();
                   groups.add(binding.getName().substring(3));
              return groups; The problem is, I always get an error if I don't restrict the results number to below 1000.
    The error is the following *javax.naming.SizeLimitExceededException: [LDAP: error code 4 - Sizelimit Exceeded];*
    After googling, I found it it's due to a field in the AD Server, that restrict the result number.
    So there is no way that I can obtain all groups without changing that field?
    Regards,
    Nuno.

    Hi Nuno,
    You have to increase the MaxPageSize value at ActiveDirectory level to retrieve results more than 1000. By default the MaxPageSize value is 1000. There is no option other than increasing the MaxPageSize value.
    Thanks & Regards,
    Murali.
    ============

  • How to get user attributes from LDAP authenticator

    I am using an LDAP authenticator and identity asserter to get user / group information.
    I would like to access LDAP attributes for the user in my ADF Taskflow (Deployed into webcenter spaces).
    Is there an available api to get all the user attributes through the established weblogic authenticator provider or do i have to directly connect to the LDAP server again?
    Any help would be appreciated

    Hi Julián,
    in fact, I've never worked with BSP iViews and so I don't know if there is a direct way to achieve what you want. Maybe you should ask within BSP forum...
    A possibility would be to create a proxy iView around the BSP iView (in fact: before the BSP AppIntegrator component) which reads the user names and passes this as application params to the BSP component. But this is
    Beginner
    Medium
    Advanced
    Also see http://help.sap.com/saphelp_nw04/helpdata/en/16/1e0541a407f06fe10000000a1550b0/frameset.htm
    Hope it helps
    Detlev

  • Cannot view the folder security after removed the default "users" group from folder

    Hi guys
    Due to the domain change, I am doing a windows 2003 server migration to windows 2012 for a file server.
    Tones of data have been copied from the old 2003 server to the new setup 2012 server.
    We need remove the "builtin\users" group from the folder security to maintain correct rights access of user to network folder.
    Once the "builtin\users" group has been removed, the account in domain admin group can no longer read the folder security.
    Has anyone faced the similar situation? 
    Or, is there any change in folder security rights of Windows 2012?
    Thanks in advance
    KC@ITL

    Hi,
    Glad to hear that the issue has been resolved.
    If you need any assistance in the future, please do not hesitate to post in our forum.
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Migrate Rpd Catalog and User ,Groups from OBIEE 11.1.1.3.0 to 11.1.1.5.0

    hi Guys,
    I have got a setup of OBIEE 11.1.1.3.0 on windows 32bit machine and now i am planning to have a setup of 11.1.1.5.0 on windows 64 bit machine.
    please tell me the Detailed steps for Migrating the Rpd Catalog and User ,Groups from OBIEE 11.1.1.3.0 to 11.1.1.5.0
    Like
    1. Do i have to copy the RPD and Catalog Directly to 1.5 or some Upgrade Assistance is to be done
    2. If i am Using the Export Provided in the myrelam ( in 1.3) and taking it to obiee 1.5 (as it already contains some inbuilt policies and groups) does it going to give me error
    Regards
    Ankit

    Check the Oracle reference I have provided earlier. Concept goes like this:
    Important difference is that upgrading from 10g to 11g is called an "out-of-place upgrade" while upgrading to another 11g is called an "in-place upgrade," because the upgrade operates on existing files. Moving from one 11g release to another 11g release is sometimes referred to as "patching."
    http://download.oracle.com/docs/cd/E21764_01/bi.1111/e16452/bi_plan.htm#BABECJJH
    Follow patching and not out-of-place upgrade as you are required to upgrade component
    http://download.oracle.com/docs/cd/E21764_01/doc.1111/e16793/patch_set_installer.htm#PATCH789
    Hope this is clear now

  • Getting user name from sopa header

    How should get user name from soap header in my udf...?i searched in sdn,but not get exact solution...

    I din't get this with SRemoteUser
    1. i've enabled " Do Not Use SOAP Envolope"
    2.Enabled ASMA
    3.Variable Transport Binding .
    used the following code as well:
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey user = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP", "SRemoteUser");
    conf.get(user);
    But not value in it.. Correct me if iam wrong..

  • Provisionusers.cmd and Migrate users/groups from Planningweb

    Hi
    Is the functionality of Provisionusers.cmd and migrateusers/groups from planning web similar?
    I feel Provsionsuers.cmd is an alternative way to migrateusers/groups from planning web.
    Please correct me if i am wrong.
    Thanks and regards
    krishnatilak

    Hi,
    The provisionusers utility basically syncs planning and essbase with the provisioning of users/groups in shared services.
    If you run the utility and a user exists in shared services but has not been created in the planning database the user will be added.
    If the user does not exist in the essbase security file then they are added.
    If it is a user that exists and has security settings on members in planning then these filters are pushed down to essbase.
    It should also remove users/groups from planning if they have been deprovisioned in shared services.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Where does apex get user details from for login in

    sorry for this stupid question. I have been looking up in google "where does apex get user details from for login in" and nothing answers my question. Basically I wanted to know when you log in your application how does apex know you have access to this application. How does it know you are a valid user because I am creating an application which basically checks if a user exist in one database and also checks if he/she exist in the second database.
    Thanks you and sorry if this is very newbie

    In the page 101 which is the login in page in the login in process. I have this in the source its not working in term of it is not letting me login in anymore even though I exist in the user table.
    DECLARE
    v_access_level number;
    BEGIN
    SELECT count(*)INTO
    v_access_level
    FROM USER
    WHERE UPPER(USER_NAME) = UPPER(:APP_USER);
    IF NVL(v_access_level, 0) !=0 THEN
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :P101_USERNAME,
        P_PASSWORD    => :P101_PASSWORD,
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':9'
    ELSE
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :P101_USERNAME,
        P_PASSWORD    => 'YtYuTrFRd',
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':9'
    END IF;
    end;
    please bare in mind that my USER table DOES NOT have a password because the authentication scheme as all the details of login in to any systems. I am only trying to check if the username exist in my USER table.
    Thanks

  • Excluding users/groups from site statistics

    Hi,
    I want to exclude users/groups (eg. the portaladmin user, developer accounts etc.) from the default site statistic reports shipped with Portal, because they obfuscate the data. Any suggestions?
    Thanks, Tony

    Tony,
    unfortunately I don't have an answer for you, but I'd like to extend your question.
    In my opinion, the default monitoring tools are non-usable and full of bugs.
    I therefore would like to see a description of the WWLOG% views and tables, to be able to wite my own custom reports and graphs. Oracle docs mention these views to do so, but don't tell how these views can be used.
    I'm trying over a month now to get the descriptions, but oracle support doesn't get an answer from development.
    So please, give us pointers to custom monitoring documentation.
    Ton

  • Sharepoint 2010: prevent users from editing a list in the datasheet view

    Hi,
    I have a sharepoint 2010 list that I need to prevent users to edit from the datasheet view. This is because I have edited the add item form on sharepoint designer and included some custom code. Moreover, I need to allow the users to view the list in datasheet
    view to make use of the datasheet custom filter view feature which is not available in the standard view. So I need users to access the datasheet view of the list in read mode only but be able to edit the list in standard view only. Is this possible? How?
    Thanks,
    George

    Hi.
    Maybe this helps...I found some users having the problem that the list WAS read only in datasheet view...this is a list of reasons why this could happen:
    Certain columns, such as Created By and Modified, are always read-only. Values for these columns are entered automatically.
    The changes you made to the selected row or column have been submitted to the server. If there is no conflict or error, you will be able to edit the row or column after the changes have been saved.
    There is an unresolved conflict or error in the selected row or column. Resolve the conflict or error before attempting to edit the selected row or column.
    The list is set up to require content approval, and you are viewing the list in the All Items view.
    In the My Submissions view of a list that requires content approval, the
    Approval Status and Comment column are read-only. Only a user with Manage Lists right can edit these two columns.
    Attachments are read-only in a list that requires content approval. You cannot view or edit attachments in any of the views.
    The document in the current row has been checked out by a user. You cannot edit the columns in the row until the user checks the document in.
    You do not have permission to edit the column or row. Contact the list author for more information.
    (from the help)
    You could also check:
    http://support.microsoft.com/kb/2274841
    Reverse engineer and you may have a solution? ;-)
    Regards
    hr class="sig">Thomas Balkeståhl - Technical Specialist - SharePoint

  • Can I get the members of Domain Users group (AD specific) with JNDI?

    Hi All,
    I've found these forums very helpful and full of great information, I've been able to retrieve all members of groups that I search for (from the information on this forum), and get the member's attributes such as email addresses through that.
    The question I have is, is there a way to query the Domain Users group, since it's a special group in Active Directory, and retrieve the members of it? So far I have been unsuccessful. Here's a query I found that works on .Net:
    (|(&({ClassFilter})(memberOf={GroupDistinguishedName}))(distinguishedName={G
    roupDistinguishedName}))
    I haven't been able to get it to work with JNDI however. Can anyone point me in the right direction?
    thanks,
    Matt

    It's not so much that the Domain Users is a special group, it's more that because by default, all users have their Primary Group set to Domain Users, that it appears to behave differently.
    So the query that you're trying to execute via JNDI, would be something like:String searchFilter = "(&(objectClass=user)(memberOf=CN=Domain Users,CN=Users,DC=Antipodes,DC=Com))";And of course if everything has been left to defaults, it doesn't return any results.
    Similarly if you look at the member attribute of Domain Users, it will be empty.
    Assuming the defaults, and every user's Primary Group is set to Domain Users, the following query would return all the user's whose primary group is Domain Users:String searchFilter = "(&(objectClass=user)(PrimaryGroupID=513))";Note that 513 is the Relative ID (RID) for Domain Users.
    Now if you set a user's Primary Group to be something other than Domain Users, then the Domain Users group would now have a value
    for it's member attribute and conversely the respective user would now have Domain Users as one of the values of their memberOf attribute.
    So then your query would be something like:
    String searchFilter = "(&(objectClass=User)(|(memberOf=CN=Domain Users,CN=Users,DC=Antipodes,DC=Com)(PrimaryGroupID=513))){code}
    I guess the fundamental question, is why do you need to determine whuch users are members of Domain Users ?
    If this is for usie in an application, where the user has authenticated and you are using group membership to make authorisation decisions, perhaps the constructed tokenGroups attribute may be more useful  as it contains the Security Identifiers (SID) for all the groups the user is a member of ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Project Server 2010 / Sharepoint 2010 Permissions not syncing to Project Site

    Project Permissions not syncing to Project Site
    Project Manager Group
    New project is created and published project server sends permissions to Sharepoint which puts users into the following groups:
    <dir><dir></dir></dir><dir><dir>
    Web Administrator (Microsoft Project Server)
    Project Managers (Microsoft Project Server)
    Team members (Microsoft Project Server)
    Readers (Microsoft Project Server)
    At this time the creator/owner, owner’s management, portfolio managers, and executives should all have Project Manager rights on the sharepoint site, and Admins will have Web Admin permissions.
    Issue #1: Only the Web Admin permissions and creator/owner permissions are being added to the Sharepoint permission groups
    Workaround #1: Going into the project site permissions and adding the
    Project Managers (Microsoft Project Server) group manually and the sync will keep the permissions
    Workaround #2: Going into the Server Settings, Manager Groups then removing or add all users to the No Permission Group, which forces an sync to all workspaces. Con: This workaround can only be down at night when users are not active since it will
    block the queue for at least an hour.
    Project Owner Transfer
    Previously created project has owner change, once saved and published project server sends permissions to update user’s permission to
    Project Managers (Microsoft Project Server) on Sharepoint project site.
    Issue #2: When Project owner is changed and project is published the owner is not getting permissions to the Sharepoint project site. However, if owner is also added to the team using the Build Team Feature the sync will give the owner Project
    Manager permissions on the Project Site.
    Workaround #1: Going into Server Settings, Project Sites, select project and Synchronize. Once this is done, the owner will have Project Manager Permissions without being added to the team.
    Users who have been added to this project in Project Server 2010, but not assigned to tasks. Users who have assignments in this project in Project Server 2010 and are contributors to the project workspace site,
    meaning that they can create and edit documents, issues, and risks. Users who have published this project or who have
    Save Project permission in Project Web App and are contributors to the project workspace site, meaning that they can create and edit documents, issues, and risks. Users who have
    Manage SharePoint Foundation permission in Project Web App and are contributors to the project workspace site, meaning that they can create and edit documents, issues, and risks.</dir></dir>

    By default when you create project build team add users in the task and publish the project plan then All the User which are available in the project plan including Project owner will go to below mentioned group in project site:
    1. creator/owner, owner’s management, portfolio managers, and executives should all have Project Manager will get access to Project Managers (Microsoft Project Server)
    2. User who are having team member access to PWA will get Team members (Microsoft Project Server) access if they are assigned to the project task.
    3. User who are having team member access to PWA will get Readers (Microsoft Project Server) access if they are not assigned to the project task.
    4. Only PWA Administrator will get the access to Web Administrator (Microsoft Project Server)
    Sharepoint permission you have to use when you want to give permission manually to users on project site  
    In the Project Site provisioning setting under Server setting if you have Check to automatically synchronize Project Web App users with Project Sites when they are created, when project managers publish projects, and when user permissions change in Project
    Server.
    Then all the user get access as per describe above and if you will give access manually to any of the user either in project server group or in Sharepoint group once you will publish the project next time all the manually given permission will go away.
    IF you want to give permission to user manually to sharepoint group or project server group then uncheck automatically synchronize Project Web App users with Project Sites when they are created, when project managers publish projects, and when user permissions
    change in Project Server.
    You check PWA site setting --> Site permission then member of Sharepoint group user who will have access to sharepoint group in PWA site setting site permission will have access to all the project site sharepoint group as Project site inherit permission
    from PWA root site.
    Both the issue which you have described is behavior of project site.
    For issue 2 when first time project owner create and publish the project and projectsite is getting created then porject owner name gets access  in the porject manager (project server group) nect time if you will change the owner and publish the project
    until he will not present in the project plan will not get the permission.
    If you want to give sharepoint permission to users then uncheck automatically synchronize Project Web App users with Project Sites when they are created, when project managers publish projects, and when user permissions change in Project Server and give
    the permission manually. 
    Project site in 2010 has some issue and not full filling customer need some time ,Ms has came up with 2013 which is having tight integration with project sites .
    Project workspace security groups are equal to the SharePoint Server 2010 security groups.
    Web Administrator equals Full Control
    Project Managers equals Design
    Team members equals Contribute
    Readers equals Read
    Users who have Manage
    SharePoint Foundation permission in Project Web App and are contributors to the project workspace site, meaning that they can
    create and edit documents, issues, and risks will get access to Web Administrator (Microsoft Project Server)
    http://technet.microsoft.com/en-us/library/cc197668(v=office.14).aspx
    kirtesh

  • Performance Point Services in Sharepoint 2010 getting annotations out of the databasse

    Hi,
    I have a requirement to put in a Reporting Services Report the comments\ annotations from a PPS score card.
    I see the annotations table in the database, but don't see how to connect the GUIDS in the annotations table to the scorecard name. Is there information that can show me how to get this data?
    David Botzenhart

    try this one:
    http://sharepointsolutions.blogspot.com/2008/06/how-do-i-make-our-sharepoint-site-stop_17.html
    if fixed the issue fine other wise could you please check the ULS logs/ application ?IIS logs at the same time user kicked out.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

Maybe you are looking for

  • Share iCloud calendar with Google Calendar

    Ok, so I'v moved all my contacts, email and calendars to iCloud and everything is wonderfull. I share a few calendars with my girlfriend and she is sharing her study calendar with me. We have a shared calendar set up, where we enter when our son is i

  • ARD asking for serial number at every launch

    Hello, Apple replaced the logic board in my laptop last week. Since getting the machine back, a lot of software needed to have its license info re-entered, but ARD is persistently asking for its serial number to be re-entered every time I launch the

  • Portal 7-8 Migration - WebFlow errors

    Hey - I am migrating a Portal 7 app to 8. What do I do with the webflows? I have run all the migration steps as per the document. However when I run the Portal, I get an error - <Dec 8, 2003 4:22:03 PM PST> <Error> <netuix> <BEA-420042> <The control

  • IPod suffering from erratic behaviour

    I was listening to my iPod the other day (in my pocket, with the hold switch on), when the volume began changing from nothing to full and back again. I took it out of my pocket, and had a look at it. The buttons seemed to work with the hold switch on

  • Satellite L50-B916 - wireless connection issue

    Hello I bought my Toshiba Satellite L50-B916 less than 6 months ago, and had to download all the drivers myself because for some reason, the OS didn't come with it. Went to the TOSHIBA MEA website to download and install corresponding drivers. Downlo