Tag Info

Hot answers tagged

7

UserProfile.PersonalSite property gets the personal site of the User: var profileManager = new UserProfileManager(ServerContext.GetContext(SPContext.Current.Site)); var profile = profileManager.GetUserProfile("domain\\username"); using (SPSite personalSite = profile.PersonalSite) { var personalSiteUrl = personalSite.PersonalUrl; }


5

For a client solution I would use the Search REST API. The grouping has to be done on the client, it depends on how you configure your Managed Properties. The trick with People is to pass the correct Result Source ID in the query: For example: ...


5

You cannot change any properties in the User Profiles via client OM code (neither .NET nor via JavaScript) with the exception of the user's profile picture. MSDN - Work with user profiles in SharePoint 2013 Not all functionality that you find in the Microsoft.Office.Server.UserProfiles assembly is available from client APIs. For example, you have ...


4

I was having the same issue and solution to the problem we got is to use following link to get the user profile photo instead of directly accessing picture url coming from sear result or accessing direct url to the image.. [https:///_layouts/15/userphoto.aspx?size=&accountname=&url=] size=S/M/L accountname=user's email url=url of image - optional - ...


4

Use SPServiceContenxt SPServiceContext serverContext = SPServiceContext.GetContext(mySite); //Create an instance of the User Profile Manager UserProfileManager profileManager = new UserProfileManager(serverContext);


3

Looks like the issue is with the UserInfo list ID. Can you export the list data and store the User as ID or Email? Then when you import the info call EnsureUser. This will re-associate the user with his correct (or new) userID record in the new site collection.


3

I may be wrong, but I don't think there is an easy/elegant way to fix this without some sort of code. The easiest way to fix this, IMO, would be a post-import powershell script which iterates each item of the list, and for each field that needs a fix-up, it reassociates it with it's correct user. If you could get an export of the original site's ...


3

Peter Holpar has a very good article on this topic as it relates to SharePoint 2010. Generally speaking, it's very much the same in SP 2013. If the property is just going to be populated once from the WCF service and then SharePoint will be the owner of the property (i.e. where people go to update it) then you do not need a BCS model or the sync connection. ...


3

SharePoint has user profile synchronization service. It allows to sync AD user details with SharePoint user profile. You can configure mapping between attributes in AD and user profile properties. Once you configured syncronization you can access properties of users. If you need only send email, I guess it can work without syncronization, just by user. ...


3

goto site settings, under look and feel select image renditions. here you can fiddle around to choose what you want to show with an image when sharepoint renders the profile image. its found here: select the image (thumbnail) by hovering over and click on edit renditions these are the sizes to change to your liking: click on the selected size to ...


3

You should use: using (SPSite site = new SPSite(_upa)) { SPServiceContext context = SPServiceContext.GetContext(site); UserProfileManager _upaManager = new UserProfileManager(context); // Chek if user exists if( _upaManager.UserExists("mydomain\\myuser")} { // The user exists } else{ // The User doesn't exists ...


3

When you changed the My Site Host URL did you extend and map it to your original my site host or did you just add the binding in IIS and then change AAM? Change the web application and ensure that all of the dependancies are working as well as changing the setting in the User Profile Service Application. Ensure that the URL you wish to use for the MySite ...


3

it looks like your workflow is picking up the last instance of the found pool of names! so in your case, you have the name JDOE, the workflow in AD picks up JDOE and JDOE1 and JDOE2 it would then return JDOE2 as its the last occurance in the array of returned items. If in the people picker you had JDOE1 it would return JDOE1 only and send the mail to ...


2

Try resetting the Sync Information using Stsadm.exe –o sync –listolddatabases 0 Stsadm.exe –o sync –deleteolddatabases 0 See “User Profile Sync” doesn’t show update data even after multiple Full Profile Import


2

You should be able to use the Search API to get a users ProfileViewsLastMonth and ProfileViewsLastWeek information. Here is a REST example: /search/_api/search/query?querytext='Elliot Wood'&sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31'&selectproperties='ProfileViewsLastMonth,ProfileViewsLastWeek' sourceid='B09A7990-05EA-4AF9-81EF-EDFAB16C4E31' ...


2

Users within Site Collections are stored within the Site Collection's own User Information List. Consider these islands from all other places where users reside. The Shared Service User Profiles are users imported from, typically Active Directory into the Profile database. It is possible that this functionality is not working properly, or was never set up, ...


2

private string GetPersonalSite(SPSite site) { var curUser = SPContext.Current.Web.CurrentUser; SPServiceContext context = SPServiceContext.GetContext(site); UserProfileManager upm = new UserProfileManager(context); UserProfile profile = upm.GetUserProfile(curUser.LoginName); return profile.PersonalUrl.AbsoluteUri; } that should work! ...


2

'A failure occurred during the processing of this command. Check diagnostic logs for more information' is in fact "Access Denied error to the User Profile Service Application". TO resolve this issue, Navigate to Manage Service Applications ---> User Profile Service Application Name ----> select Permissions from the ribbon ----> Add your user account ...


2

You need to setup Exclusion Filters for User Profile Synchronization in SharePoint to check for the 'disabled' flag on the Active Directory account. Then those accounts should be handled automatically. Specifically, to not synchronize disabled AD accounts, you set to exclude: userAccountControl Bit on equals 2 More info on that is here.


2

As long as you set the User Profile Sync to omit the Disabled User OU, the users will be removed from the import. You can also add the additional check for "disabled" but simply changing OU will work. Also, ensure that you are regularly running a search crawl of the User Profiles so that the user is removed from Search Results.


2

If you need Cost Center in the user info list, you have to mark it as Replicable in the User Profile Service Application. I never use the User Info List for these types of solutions, I always use Search, it is significantly faster and more scalable. You have to: Crawl your user profiles. Promote the People: Cost Center property to a managed property ...


2

Can you describe WHY you want info in the User Info List? Generally you sync with the User Profile Service and leave the User Info List alone. I think you don't understand the architecture. There are many great guides on the topic, the best by far is Spence Harbar's: http://www.harbar.net/articles/sp2010ups.aspx It says 2010 but applies to 2013 as well. ...


2

Choice JS or Server OM depends on you. For example if you think that in the future you will need the same code in SP Online, in that case is better write the code in JS. The main object for that is PeopleManager. This is an example of JS code: var personProperties; // Ensure that the SP.UserProfiles.js file is loaded before the custom code runs. ...


2

You need to go to Document Library Ribbon -> Under Library -> Library Settings -> Permissions for this document library OR simply Document Library Ribbon -> Under Library -> Library Permissions By default the document library will be inheriting permissions from Site, you need to click "Stop Inheriting permissions" ribbon button to stop that.. Than you ...


2

You could follow eirikb's suggestion and create a Console Application project in VS to run it. Or you could scrap the whole RWEP bit and just use the SharePoint 20xx Management Shell / PowerShell since it's a one off run. $site = Get-SPSite "http://yoursite" $user = $site.RootWeb.SiteUsers.GetByEmail("theemail@domain.com") $user.Email = ...


2

I ran into the same issue, user account was a farm admin, local machine administrator, had local run as rights on the server, cleared the SP cache, pretty much everything you tried I had tried. I found out that the April 2014 CU contained a fix (http://support.microsoft.com/kb/2760265) where the User Profile Syncrhonisation service will not run when using ...


2

I assume you have a customized page where these users enter the User's name and then you replace all instances of that name with a new one... To do this client side, you need to use the 'SearchPrincipals" webservice. It will return a list of possible matches based on a name/email/login name. You might also be interested in this client side People Picker ...


2

Everything you describe here is EXACTLY what the User Profile Service is built for. Can you explain that to your client? Tell them that you can use the User Profile Service and be done in a couple hours or spend days, weeks, months working around it and they will never be happy, finally returning to the User Profile Service. Sometimes it is your ...


2

This example uses the User Profiles object model to display the user profile properties that exist on the server. Replace servername with an actual value before running the code example. Also add references to the following in your Microsoft Visual Studio project: Microsoft.Office.Server Microsoft.Office.Server.UserProfiles Microsoft.SharePoint System.Web ...


2

Try this: var profileManager = new UserProfileManager(ServerContext.GetContext(SPContext.Current.Site)); var profile = profileManager.GetUserProfile("domain\\username"); //instead of GetUserProfile use GetUserProfile(True); using (SPSite personalSite = profile.PersonalSite) { var personalSiteUrl = personalSite.PersonalUrl; } ...



Only top voted, non community-wiki answers of a minimum length are eligible