locked
SP users missing from usergroup.asmx, exists in userprofileservice.asmx RRS feed

  • Question

  • I have a custom developed web part which uses a datatable built from the list of employees pulled from the "usergroup.asmx" web service supplemented with additional data from the "userprofileservice.asmx" (this additional data is pulled for each record returned from "usergroup.asmx")

    After this was put into use various team leads and other employees noticed people missing from the main result set which should display everyone.

    After some digging we noticed that a good number of people are missing from the result returned by the "usergroup.asmx" web service. These are people that we know exist in the SP Site (they are active employees and they have mysites). The missing people DO show up in the "userprofileservice.asmx" web service with the correct information.

    I'm wondering if anyone can tell me either how "usergroup.asmx" is populated or just how I can add a user to whatever data it pulls from?
    Wednesday, July 8, 2009 4:06 PM

Answers

  • I have, I think, more or less found the solution to the reported issue. I was using the 'usergroup.asmx' service to point to our MySite collection.

    While every user has a MySite, the users are not added to the 'People and Groups' list until they actually log in and CREATE a MySite. The missing users were people who had never actually visited the MySites page and so never showed up in the list that the 'usergroup.asmx' service was looking at.

    I tested this with the help our IT folks and confirmed it fixed by having one of the missing users log in and, subsequently, show up.

    On another note, I also began re-writing the application using the search.asmx service. It seemed to work well but I ran into a disconnect with some of the profile property names which were not what I expected they should have been. For instance 'Title' actually needed to be 'JobTitle' in the query to get the correct result. I wasn't able to find a reference to 'JobTitle' anywhere in the profiles though.
    Monday, July 13, 2009 6:37 PM

All replies

  • Usergroup.asmx pulls users, groups or role definitions.  The users returned have rights in SharePoint.  Whereas User Profile Service pulls through everyone who has a profile, these users may not have rights in SharePoint and some maybe service accounts depending on the profile importer is configured with the LDAP query.  Can you not use the user profile service as the definitive source of information?  or use the search web service looking at the people scope.
    My SharePoint Blog - http://www.davehunter.co.uk/blog
    Wednesday, July 8, 2009 4:28 PM
  • The problem I ran in to trying to use the user profile service as the definitive source is that the service must be queried one user at a time and you have to know, beforehand, which user name you want to get info on. If there was a way to pull every profile out of the user profile service I think that would be ideal.

    Using the search service is an intersting idea though, i'll have to play around with it and see what kind of results I get back.

    Thanks for the feedback!
    Wednesday, July 8, 2009 10:01 PM
  • I have, I think, more or less found the solution to the reported issue. I was using the 'usergroup.asmx' service to point to our MySite collection.

    While every user has a MySite, the users are not added to the 'People and Groups' list until they actually log in and CREATE a MySite. The missing users were people who had never actually visited the MySites page and so never showed up in the list that the 'usergroup.asmx' service was looking at.

    I tested this with the help our IT folks and confirmed it fixed by having one of the missing users log in and, subsequently, show up.

    On another note, I also began re-writing the application using the search.asmx service. It seemed to work well but I ran into a disconnect with some of the profile property names which were not what I expected they should have been. For instance 'Title' actually needed to be 'JobTitle' in the query to get the correct result. I wasn't able to find a reference to 'JobTitle' anywhere in the profiles though.
    Monday, July 13, 2009 6:37 PM
  • Re: your discrepancy between "Title" and "JobTitle" - you'll find that whilst the name of the profile property is "Title" this gets rolled up into a Managed Property "JobTitle" that the search uses. Check SSP Admin > "Search Settings" > "Metadata property mappings".

    You need to use these managed properties when searching.

    Hope that helps.
    Thursday, August 13, 2009 10:59 AM