I'm using MOSS 2007 with SP2 and FEB 2010 CU applied. We've set up a server farm and we have a site collection hosting Infopath forms.
I'm trying to use the MOSS user profile service and specifically the GetUserProfileByName web service method to get a user's display name and email address. Unfortunately I'm having problems calling the web service, with some users not being found.
If a user logs in and accesses the SharePoint site, the web service (being called from an InfoPath form) finds their user profile without any issue. However if the user hasn't accessed SharePoint before, the user profile cannot be found (again from an InfoPath form being accessed by a different user). As soon as we log in to the SharePoint site as the user that could not be found, the user profile seems to be activated and can be found by the GetUserProfileByName method (even when called by a different user).
It seems like the user profile gets activated when the user logs in but before this point the user profile isn't visible to the web service. I've also tried running SPWeb.EnsureUser and this seems to activate the profile as well.
Does anyone have any ideas as to why these user profiles can't be found? Is it failing to synchronise these profiles properly with the site collection? The timer job for Profile Synchronisation seems to be running fine and there aren't any obvious errors in the error log, so I'm not sure why the profiles can't be found.
Is it a permissions issue? All authenticated users have the 'Personal Feature' and 'Personal Site' permissions in the shared service provider. Our service accounts also have all the personaliation services permissions.
I'm really at a loss as to why this issue is occuring. The user profile is there and can be viewed through the SSP so why can't the webservice find it? The workaround would be to use the SPWeb.EnsureUser method to add all the users to the site collection but this seems a little extreme when the user profile service should work.
Thanks in advance for any help.