Tag Info

New answers tagged

0

EDIT: I'll leave what I wrote below, but that information is only good if you've already saved the form and are back in to do an edit. To fix it, change the line: acctName = assigned.dictionaryEntries[0].AccountName; To var peopleData = $("div[id='divEntityData']"); acctName = peopleData.attr("description"); I don't know how well this will scale, if ...


0

As I recall, the user and groups operations require admin/full control privs to use. You might want to try using the user profile service operations to get the pieces of information. You can gat all the data you need out of your GetUserProfileByName call. You'd just need to alter the code a little bit to split the email address retrieved by the ...


0

An easier approach is to allow the user to update the property and just hide the value from their edit page. Then you don't need RWEP. Just a thought.


1

Run with Elevated privileges runs the Code in System Account/App pool account. So you will have to make sure that App pool account has "Manage Profile Permission" rights to the User Profile Service. Follow below steps: Go to Central Admin-->Choose Application Management --> Manage Service Applications--> Select the User Profile Service Application (do not ...


1

This is possible also in SharePoint OnLine. These are the steps that you have to do: (Go to) Sharepoint Admin -> User Profiles -> Manage User Properties -> New Property Here you have to choiche from some option. For sure you will need to make the property indexed Then go to Search -> Manage Search Schema -> New Managed Properties Here you have to ...


0

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


0

You can try something like this, Get-ADUser -Filter * -SearchBase "ou=TestOU,dc=domainController01,dc=com" | Set-ADUser -customProperty $true OR # Get all users in the SomeOU. $AllUsers = Get-ADUser -Filter * -SearchBase "OU=ChangeMeOU,OU=UserAccounts,DC=DomainController01,DC=COM" # Iterate the users and update the department and title attributes in AD. ...


0

You should not have to get the current user. Calling GetUserProfile(bool) will get the user profile of the current user, and optionally create the user profile if it does not exist. The user should have permission to update their own profile, so it is very bad practice to use RunWithElevatedPriveledges. You should only need the Service Context for the ...


1

When working with the User Profile Service you will find that uninitialized values are not sent via REST. Your code has to account for the fact that the user may "opt out" and not populate a value. In your code determine if the value is present and if not, determine the default, in your case "false". I like to believe that this is an "optimization". :)



Top 50 recent answers are included