Tag Info

Hot answers tagged

7

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


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


3

If you have Exchange Online as well, you can use Powershell Set-UserPhoto. The cmdlet works for both on-premise and online.


3

This is just an expansion of @aveenavs answer, which works great for me, unless the user is on the root site of the application. The only difference is using _spPageContextInfo.webAbsoluteUrl instead of _spPageContextInfo.webServerRelativeUrl in the url in the ajax call. So I would change it to this: //Get user's personal MySite url ...


3

in this case msdn is you best friend. As i created it for the company that i work for i could answer this for you ;) mysite limmit for webapplication first you need to understand what is a mysite? a mysite is a site collection. The mysite when setup if done according to best practice should be hosted on its own web application. This web application ...


3

When ever you make a change in AD for one user or all users, You have to run the User Profile Sync Crawl. You can schedule it daily /weekly or what ever. We schedule incremental every night so that all the changes imported from AD to SharePoint.Run Full Profile Import once a month.


3

The ObjectGUID is a binary string ( or octet string ), so what you are probably seeing is some random nonsense characters when you attempt display the value. The ObjectGUID actually follows a well-established standard - it's a UUID version 4. With this information, you should be able to decode the binary string into a readable string representation. Take ...


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

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


2

Yes, this is correct. In our intranet we use disabling user to prevent unauthorized access. So the way this user references remain intact and guarantee the security of sensitive information. Hope this helps you.


2

First thing is check that you are actually syncing. I would first visit Central Administration and under your user profile service execute a full sync and verify it runs. There is a visual queue that it's running on the user profile service page. After it runs you can check to see if the user name is updated. I would also look directly and the users ...


2

I would try using Search REST API for this. The API can be used to query User Profiles and return the path to their My Site. You could even create a A-Z directory if you wanted. Very easy to do with search.


2

The MyLinks control is hidden in SharePoint 2010, but as you point out still present in both 2010 and 2013. The links are part of the User Profile. So they are in the User Profile Database. You can access them via the QuickLinksManager and the User Profile Property "QuickLinks". I should point out that the preferred technique in 2010 and 2013 is to use Tags ...


2

You can disable the timer job responsible for sending mail for MySite Suggestions Email job. From Central Administration, click Monitoring Under the Timer Jobs heading, click Review job definitions Scroll down (or click through pages) until you find a job called User Profile Service - User Profile My Site Suggestions Email Job


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

I was running into the same issues and it turned out I was referencing the wrong DLLs. I was also having issues with CreatePersonalSiteEnqueueBulk not being recognized. I was referencing the 15 version not the 16 version and also the 16 version I had was out of date. Be sure you are referencing the proper DLL and have the most up to date version. I'm now ...


2

You can expand the user field using following code CAMLQueryOptions: "<QueryOptions><ExpandUserField>True</ExpandUserField></QueryOptions>" Now you can extract username in success method by using string manipulation.


2

I have a Powershell function in my profile (it also handles loading all the CSOM modules too) that looks like this: #This will handle iterating through all the OD4B sites that have been provisioned #and setting an eDiscovery SCA and any other SCAs as necessary $sca = "user@domain.com" $Password = Read-Host -Prompt "Please enter your password" ...


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


1

The look and feel in your screenshot is the new look and feel of the mysite. Microsoft did some changes to the look and feel of SharePoint Online. These updates were deployed during summer of 2014. To mimic the old look and feel, you can create a new master page and CSS file and deploy these to all your mySites. However there is no guarantee that your ...


1

I've exactly the same problem with you. You can delete the current connection and create a new one, then start synchronize it. And try to focus on Sync Status on screen when you starting sync to see if there is any change there. If not, I think difinitely cause of sync.


1

Its advisable to create a custom Page Layout based on your requirement. Then create a Welcome Page out of that. Once completed, you can create a PowerShell Script which goes and create this Page for existing My Sites. And also change the Welcome Page to the newly created page.


1

If the current user is part of the FARM ADMINISTRATORS group then the below code currentUser.get_loginName() will return Sharepoint\System. This is the expected behavior and you don't need to worry much. Try using a normal user account and you can see it returns the expected result. Alternatively you can also use currentUser.get_title()


1

You can also create a sandbox Webpart and use the below code. Add the user profile dll and using Microsoft.SharePoint.Client.UserProfiles; in your code const string serverUrl = "http://serverName/"; const string targetUser = "domainName\\userName"; // Connect to the client context. ClientContext clientContext = new ...


1

You can add a Script Editor Webpart and use the rest api to get the user profile details. Below is a snippet which show you to get an instance of people manager using rest api $.ajax({ url: "http://<site url>/_api/sp.userprofiles.peoplemanager", type: "GET",headers: { "accept": "application/json;odata=verbose" }, success: successHandler, error: ...


1

You can get the login name from the user profile as illustrated below: foreach (UserProfile userProfile in profileManager) { string loginName = userProfile["AccountName"][0] as string; Console.WriteLine(loginName); }


1

You should first "convert" the SP.FieldUserValue (let's call it fuv in code) to an SP.User object, then have you already the login name you need: var userId = fuv.get_lookupId(); var user = context.get_web().getUserById(userId); context.Load(user); context.executeQueryAsync(onRequestSuccess, onRequestFail); function onRequestSuccess() { var ...


1

As per Microsoft maximum 10,000 groups are allowed per Site Collection. Anything beyond that will cause performance. (The performance degrade you can observe while adding users into group etc.) Hence I don't think in your use case this will have any performance impact.


1

You may have orphaned user profiles in your environment, wheich you may need to clean up. That means that a new user with the same domain\username as the old user, then SharePoint would create a new user profile, and not migrate the old. But if the old user wasn't deleted from the user information list, the new user can't be imported correct, and gets an ...



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