Hot answers tagged

8

Getting only the current user won't be enough to get user profile properties. You need to use the PeopleManager as well. Your code should look something like this: var context = SP.ClientContext.get_current() var web = context.get_web(); var user = web.get_currentUser(); var peopleManager = new SP.UserProfiles.PeopleManager(context); var personProperties = ...


6

You can perform the following to resolve the issues: Make sure User Profile Synchronization service is running In the user profile service application make sure "Profile Synchronization Status" is not stuck in synchronizing state. Start a full User Profile Synchronization Re-add forest and make sure the password of the account used for synchronization ...


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


4

based on your statement, it looks like the user profile sync is not happening properly. follow the below troubleshooting steps: Try doing a sync manually meaning re-importing. that should clear the problems. Inspect the log entries Make sure timer services and user profile sync services are running properly. Also, additionally make sure the account used ...


4

The issue is that your Forest Name and NetBIOS name are different. You have to follow the guide from Spence Harbar: http://www.harbar.net/articles/sp2010ups.aspx . It was written for 2010 but still applies to 2013. After you create the UPA and before you import profiles you have to set NetBIOSDomainNamesEnabled to true. $upsa = Get-SPServiceApplication –Id ...


3

Since I have to load the userprofile script, I had to use: SP.SOD.executeFunc('userprofile', 'SP.UserProfiles.PeopleManager', function() { var clientContext = new SP.ClientContext.get_current(); var personProperties = new SP.UserProfiles.PeopleManager(clientContext).getMyProperties(); clientContext.load(personProperties); ...


3

I think you can face problem as sometimes the profile synchronization timer job does not correctly synchronize the changes in the User name and Account name information. You need to execute the following Move-SPUser command (an equivalent of the STSADM MigrateUser command) for the user account in order to update the account name in SharePoint: Move-SPUser ...


3

If you want to get all users of site then _spPageContextInfo.webAbsoluteUrl + "/_api/Web/SiteUsers" If You want to display information of User in site then _spPageContextInfo.webAbsoluteUrl + "/_api/Web/SiteUserInfoList" Display particular user information then _spPageContextInfo.webAbsoluteUrl + "_api/web/GetUserById("+UserID+")" But in your case ...


3

That can be specified by the URL that you use: Get all properties of current user: http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties Get all properties of Specific User: For Office 365/SharePoint Online: http://siteurl/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|user@domain.com' For ...


3

There's only one account in AD but they end up being treated like two different user profiles within SharePoint. You're on the right track when you mention the claims prefix. Most likely, this site at one point used Classic authentication and was later changed to Claims authentication (or vice versa but moving a site 'backwards' from Claims to Classic ...


3

You can use this REST endpoint: https://<server>/_api/sp.userprofiles.peoplemanager/getPropertiesFor(@v)?@v='domain\LoginName' This retrieves all profile information for the given LoginName. You can select the property PersonalUrl by adding $select = PersonalUrl For more information see the User profiles REST API reference at MSDN.


3

If you have SharePoint Server, implementing the User Profile Service will take care of this for you. If you're using SharePoint Foundation, there is no out of the box method to update these other properties automatically. You would need to implement a pull from Active Directory to the UIL property for each user in the Site Collection. An example of that can ...


3

To check what's the URL of the personal site of a user. Follow below steps Login to SharePoint admin center Go to User profiles > Manage User Profiles > Search for your user Go to edit profile page. Check what's in Personal Site. If you want to delete user's personal site then use following command Connect-SPOService -Url ...


3

Your code is fine. I would not attempt to circumvent the problem as it may be telling you that there is in fact something wrong with your setup. There are many reports (I've experienced this myself) where the User Profile Service is throwing exceptions and needs to be brought back to full health. e.g. Go to Central Admin -> Manage Web Applications. ...


2

The supported method is to migrate the User Profile Service Databases together - you can't do them separately. All your noteboard entries are stored in the UserProfile Social Database. You could try: Use API to query the user profile service and export the required values and then re-import them into destination farm. Attempt to use only the social ...


2

When you delete a user account, the account becomes inactive. However, for approximately 30 days after you have deleted it, you can restore the account and the associated data. If your organization synchronizes user accounts to Office 365 from a local Active Directory environment, you must delete and restore those user accounts in your local Active ...


2

Recently I had similar but no the same issue: one user get married and changed her surname. Admins changed her Active Directory login name. The only problem we faced was with Project Server 2013 in Project Permission Mode - I had to add user manually to Security Group. All other permissions etc was intact. Web app was in claims mode. But what happens if ...


2

You need to type in search query in the Find profiles field and click Find in order to see any profiles. * is not possible, but if you type in part of the domain, you should get all users, e.g., if user accounts are DOMAIN\user, you could search with DOMAIN to get all users. Pretty close to *, I'd say.


2

Yes this issue fixed in SP2. You dont need to apply the WSS sp2, simply Install the SP2 for server and if you have any language packs installed then SP2 for lps also required. After that you have to run the config wizard on the all server in the farm. Now make sure the server is uptodate, none of the database(content, services & config) says upgrade ...


2

You should use SP.UserProfiles.js to get user profile properties. Example: var personProperties; // Ensure that the SP.UserProfiles.js file is loaded before the custom code runs. SP.SOD.executeOrDelayUntilScriptLoaded(getUserProperties, 'SP.UserProfiles.js'); function getUserProperties() { // Replace the placeholder value with the target user's ...


2

that is really tough question to answer. You have to check the ULS logs and Event Viewer during the time when it stuck. I would do following things( i hate AutospInstaller) Delete the User Profile service check the Certs store on server, make sure no SharePoint/FIm certs over their, if any delete them.check this check the central admin > monitoring and ...


2

I reconfigured the peoplepicker and it worked like a charm. $wa.PeoplePickerSettings.SearchActiveDirectoryDomains.Clear();


2

The user object needs to exist in a UIL. That's the primary responsibility of stsadm/Move-SPUser: to migrate users within the UIL to the new identity. The User Profile Service can, in certain scenarios, automatically migrate a user when it has detected a change, but from the sounds of it, you don't need to do any work for this particular user.


2

You could use try catch. If it always crashes. Not the cleanest way of handling it but this should do it. But I would call this a quickfix. SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite(SPContext.Current.Site.Url)) { SPServiceContext ctx = SPServiceContext.GetContext(site); try { ...


1

What are you actually retrieving represents the claims-aware user identifier which in your case, because it is for Windows (i:0#.w part), which in SharePoint 2013 is the native one (unless you have created specifically your web app using Classic - that you shouldn't). One can convert between classic login and claims-aware, example here ...


1

After further investigating I found that Notes is a property of the SPUser class. Thus, following would work: var spRole = new SPRoleAssignment("domain\\name", "abc@xyz.com", "name", "notes for user"); var spUser = (SPUser)spRole.Member; var notes = spUser.Notes;


1

You could query the user information list for this. http://your-site-name/_vti_bin/ListData.svc/UserInformationList(userid) and get the properties you want using $select. Or, you can just expand the created by and modified by fields by using: http://your-site-name/_vti_bin/ListData.svc/ListName(itemId)?$expand=CreatedBy,ModifiedBy Update: Added itemId as ...


1

User fields are really a Lookup to hidden UserInfoList on every site collection. Information on this list is synchronized with User Profile Service using timer job. This job is probably executed every hour. That's why your changes apply after about 40 minutes.


1

I guess the application pool is running under that user. If you Login to your Site with the same (managed) account the web application is running under, it will identify you as "System Account".


1

After many tests, finally I can reproduce the error "There is already a term with the same default label and parent term" In my custom termset 'CustBusinesUnit', the "IsAvailableforTagging" is unchecked. It means: User profile cannot REUSE the existing terms in the termset User profile can ADD NEW terms in the termset and use it as the profile value ...



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