Hot answers tagged

9

Gary Lapointe and Mathew McDermott recently published an article on this topic in SharePointPro magazine. It is available online here: http://www.sharepointpromag.com/article/sharepoint/monitor-sharepoint-user-profile-changes-129846 Synopsis of the article: First you enable logging via the STSADM tool (no PS available for this) stsadm -o ...


6

Looks like I found the answer.. $MySite = Get-SPSite "$site" $context = Get-SPServiceContext $MySite $profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context) $profilemanager.properties | ft name,displayorder $profileManager.Properties.SetDisplayOrderByPropertyName(“userpropertyname”,1) ...


5

You can iterate through all user profiles and update them. The PowerShell script can look like this: [void][reflection.assembly]::Loadwithpartialname("Microsoft.Office.Server"); Add-PSSnapin Microsoft.SharePoint.PowerShell $site=Get-SPSite "https://yourSitecCollection" $serviceContext = Get-SPServiceContext $site; $upm = new-object ...


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 ...


5

Browse to the User Profile service application and select the manage user properties link. From here, find the mobile number field and select the edit item from the item context menu. Once in there, scroll down to the Display Settings section and check the "Show on the Edit Details page" option. You may also want to check the "Show in the profile ...


5

Finally I figured it out. UserProfileManager internally checks HttpContext.Current.User to determine if current user can view property value. The trick is to replace context and user (if HttpContext.Current.User is null, null reference thrown in UserProfileManager constructor, so this is required). The final code looks like this one: ...


4

You can change the account by running the stsadm -o migrateuser command: http://support.microsoft.com/kb/953131 This will rename the userid in the UserInfo table in your content databases to the new userid. If that doesn't work try looking at your user profile service application. Every hour a timer job runs that syncs user information from this service ...


4

To set the Manage Profiles permissions do as follows: Go to Central Admin Choose Application Management > Manage Service Applicatrions Select the User Profile Service Application (do not click the link) Click Administrators in the ribbon Add the user and set the Manage Profiles permission for it Click OK Your done!


4

You need to get a user profile object and once you have the object you can access the profile's properties, including the custom ones. For example: UserProfileManager upm = new UserProfileManager(SPServiceContext.GetContext(site)); UserProfile p = upm.GetUserProfile("accountname"); object value = p["propertyname"][0];


3

Sharepoint 2010 has the ability to log just about everything ranging from your dog barking to the server has crashed. Not all of it as activated by default though. Have a look at Monitoring > Configure diagnostic logging in your Central Admin. Under SharePoint Portal Server there are a couple which you need to tick: SPS People User Profiles Personal ...


3

Take a look at my answer provided here: SharePoint 2010 - Change order of User Profile properties Section is just another profile property and it is not a container of properties. Basically you can go over properties, find desired section property and then read properties until you find another section property. Addition I have manage to make one simple ...


3

You should check if the user exists with before you ask for the profile: if ( profileManager.UserExists(_userName) ) { user = profileManager.GetUserProfile(_userName); } It might also be a good idea to check if the login is valid (eg. the user has logged in before). You can use EnsureUser() for this SPUser user = site.RootWeb.EnsureUser(_userName); ...


3

Open ADSIEdit and open the properties of a user in your environment that has this information completed. Scroll down the list of properties until you find the one that has that information in it. Once you find it, look at the property name. It often is not what it is labeled in the ADUC forms. This is the name of the property you want. Once you have this ...


3

I wrote a simple js urlrewriter for it and added it to the master page. $(document).ready(function () { var originalURL = document.URL; var url = document.URL; if ((url.indexOf("userdisp.aspx") != -1) && (url.indexOf("Force=True") == -1)) { if (url.indexOf("?") != -1) { var mainurl = url.substring(0, ...


3

Not really - the User Profile properties aren't stored in a list (which is where Event Receivers are registered) - they're all stored in the User Profile Database which is managed by the User Profile Service Application. If you want to sync profile changes with an external system, you can write a Timer Job to look up the user profile properties and ...


3

As James said, you could create a timer job to sync profile changes with the external system. But, to detect the changes in user profile properties, I would suggest you to look into UserProfileChangeCollection because it contains a complete log of changed user profiles. using (SPSite site = new SPSite("http://server1")) { ...


3

Try Removing her from the hidden user list https://<siteUrl>/_catalogs/users/simple.aspx Then when she logs in again, it should re-add her to this list. You can then confirm the name has been updated


3

I would suggest to do not reinvent the wheel resolve personal site url from user login name directly instead of constructing the url to display form of User Information list (/_layouts/15/userdisp?ID=<user id>). The following example demonstrates how to retrieve user personal site url: function navigateToPersonalSite() { ...


2

There is no way you'll ever get access to the users password. (In fact SharePoint don't know it, as Authentication is handles by other components. In fact even these hopefully don't know it, but only have some hash of it). To access anything in the host web you can use the cross-domain library. Login will be handlede automatically. See How to: Access ...


2

their is differece between both of properties. Ask Me About basically map to SPS-Responsibility user profile Proptery. Which explain, basically it is your responsibilities at the job. Which might be different from your skill set, might be you have more skills then the responsibilities. Skills as display name saying, it is skills you have.


2

Are you doing this on-premise? I'm not sure this is supported on-prem yet! See details here: What about on-premises? Right now this capability was released only to the Office 365 side, but we are actively listening input from the customers and partners for following other actions. You can still continue using user profile web service in the ...


2

That is how crawl works. If you have PhoneNumber in these format: 1234567890 1234 567890 123 4567 890 123 456 7890 When crawling, every sign or space " ", "-", "_", "(", ")" is like delimiter and it is putted in new place inside array. For example: for 1. it will be array[0] with (1234567890), for 2. will be array[0 and 1] with (1234 and 567890) ...


2

I would recommend using a query against the change log. The "Event Receiver" really isn't it's just a timer job using the same approach detailed in the article. You could even run it all external to SharePoint from PowerShell if you wanted. No need to deploy custom code to SharePoint.


2

In SharePoint Online you are currently allowed to have as many as 3600 characters in a User Profile Property string (Single Value). I tried to add 10’000, and got a helpful error message: On SharePoint Server 2010 the max value is 1999, and on SharePoint Server 2013 the max value is the same as in SharePoint Online; 3600.


2

Instead of reloading the page I would suggest that you implement some actual error handling in that function. So instead of: function onRequestFail(sender, args) { window.location.reload(); } You should consider doing something like this: function onRequestFail(sender, args) { // Add OOTB status message to the page. var status = ...


2

This is definitely not a good practice. As someone has already pointed out, if the request keeps failing, you'll end up with an infinite loop. You said you don't know why the request sometimes fails. In order to investigate the underlying cause, the args arguments has all that you need: function onQueryFailed(sender, args) { console.log('Request ...


2

Found my problem... Instead of a full crawl on the content source, I did an incremental crawl. Silly me... So it worked all along


2

You can configure the property to show in their profile if you want to show it there. Another option would be to load it into a user control added to the masterpage or a web part to display it on selected pages. You can then configure it to display the message you want to show. Accessing the data is done through the UserProfileManager and UserProfile ...


2

So, by turning off replication, that means it won't update the field anymore. That column and data will still live in the user information list on each site collection. If you truly want it gone, you will need to write some code (.net or powershell) to remove that column in the user information list on each site collection.


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 ...



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