How to Add a new user in Project Server 2016 via Powershell or Code

%3CLINGO-SUB%20id%3D%22lingo-sub-1601128%22%20slang%3D%22en-US%22%3EHow%20to%20Add%20a%20new%20user%20in%20Project%20Server%202016%20via%20Powershell%20or%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1601128%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%3CSPAN%3E1-%20I%20am%20using%20Project%20Server%202016%20and%20I%20have%20100%20users%20added%20...But%20few%202%2F3%20users%20are%20not%20getting%20added%20in%26nbsp%3B%20project%20Server%202016%20%3F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E2-%20People-picker%20is%20not%20recognizing%26nbsp%3Bhis%20account%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20PWA%20Setting%20-%26gt%3B%20Manage%20Users%20-%26gt%3BNew%20User%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E3-%26nbsp%3B%20screen%20shot%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PS-2016-user.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F213451i2329511CEDFAD273%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22PS-2016-user.png%22%20alt%3D%22User%20Logon%20Account%20-%20issue%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EUser%20Logon%20Account%20-%20issue%3C%2FSPAN%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E4-%26nbsp%3B%20Is%20there%20any%20way%20to%20add%20user%20via%20Powershell%20or%20Visual%20Studio%20Code%20%3F%3CBR%20%2F%3EPls%20suggest%20...%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1601193%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Add%20a%20new%20user%20in%20Project%20Server%202016%20via%20Powershell%20or%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1601193%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F31286%22%20target%3D%22_blank%22%3E%40M.A.%20Farooqui%3C%2FA%3E%26nbsp%3BHave%20you%20tried%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fsharepoint-pnp%2Fadd-pnpusertogroup%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAdd-PnPUserToGroup%3C%2FA%3E%3F%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fsharepoint%2Fsharepoint-pnp%2Fsharepoint-pnp-cmdlets%3Fview%3Dsharepoint-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EInstall%20the%20PnP%20module%3C%2FA%3E%20and%20give%20it%20a%20try.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1620044%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Add%20a%20new%20user%20in%20Project%20Server%202016%20via%20Powershell%20or%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1620044%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F579481%22%20target%3D%22_blank%22%3E%40DeanMorgan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20able%20to%20add%20user%20in%20SharePoint%20sites%20any%20group%20with%20PnP%20script%20and%20via%20Normal%20native%20Powershell.%3C%2FP%3E%3CP%3EBut%20....I%20am%20unable%20to%20add%201%20specific%20user%20in%20Project%20Servers%202016's%26nbsp%3B%20Users%20Page-%26gt%3B%20Add%20New%20User.%3C%2FP%3E%3CP%3E%E2%80%A6.here%20account%20name%20of%20that%20user%20is%20not%20being%20looked%20up%20by%20project%20Server%20as%20shown%20in%20screenshot.%3C%2FP%3E%3CP%3EDoes%20anyone%20knows%20how%20to%20add%20powershell%20in%20Project%20Server's%20User%20page.%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1621763%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Add%20a%20new%20user%20in%20Project%20Server%202016%20via%20Powershell%20or%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1621763%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F31286%22%20target%3D%22_blank%22%3E%40M.A.%20Farooqui%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EFrom%20memory%20I%20don't%20think%20this%20is%20possible%20using%20CSOM%2C%20I%20think%20you%20will%20need%20to%20use%20the%20PSI%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice%2Fclient-developer%2Fproject%2Fproject-psi-reference-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice%2Fclient-developer%2Fproject%2Fproject-psi-reference-overview%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThe%20PSI%20can%20be%20used%20in%20PowerShell%20scripts%20or%20compiled%20code.%3C%2FP%3E%0A%3CP%3EPaul%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1764104%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Add%20a%20new%20user%20in%20Project%20Server%202016%20via%20Powershell%20or%20Code%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1764104%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F31286%22%20target%3D%22_blank%22%3E%40M.A.%20Farooqui%3C%2FA%3E%26nbsp%3BYou%20can%20verify%20the%20users%20is%20it%20already%20correct%2C%20from%20Active%20Directory%20Users%20and%20Groups.%20Check%20the%20users%20properties%20because%20sometimes%20Contoso%5Cadamb%20is%20different%20properties%20with%20adamb%40contoso.com%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

1- I am using Project Server 2016 and I have 100 users added ...But few 2/3 users are not getting added in  project Server 2016 ?
2- People-picker is not recognizing his account 

  PWA Setting -> Manage Users ->New User 

3-  screen shot
User Logon Account - issueUser Logon Account - issue

4-  Is there any way to add user via Powershell or Visual Studio Code ?
Pls suggest ...

4 Replies

@DeanMorgan 

I am able to add user in SharePoint sites any group with PnP script and via Normal native Powershell.

But ....I am unable to add 1 specific user in Project Servers 2016's  Users Page-> Add New User.

….here account name of that user is not being looked up by project Server as shown in screenshot.

Does anyone knows how to add powershell in Project Server's User page.

Thanks

Hello @M.A. Farooqui ,

From memory I don't think this is possible using CSOM, I think you will need to use the PSI: https://docs.microsoft.com/en-us/office/client-developer/project/project-psi-reference-overview

The PSI can be used in PowerShell scripts or compiled code.

Paul

@M.A. Farooqui You can verify the users is it already correct, from Active Directory Users and Groups. Check the users properties because sometimes Contoso\adamb is different properties with adamb@contoso.com