Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to get the User ID using PowerShell CSOM
I know its $replacedUser =$web.EnsureUser("domainName\Account") server side but I don't know how to do it client side
$replacedUser =$web.EnsureUser("domainName\Account")
Should work more or less the same:
$identity = $web.EnsureUser($user) $ctx.Load($identity) $ctx.ExecuteQuery()
$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $replacedUser =$Context.Web.EnsureUser(domain\USER)
this worked
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.