SOLVED

Office 365 - Contacts

%3CLINGO-SUB%20id%3D%22lingo-sub-310337%22%20slang%3D%22en-US%22%3EOffice%20365%20-%20Contacts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-310337%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20have%20a%20small%20project%20to%20sync%20contact%20that%20we%20have%20in%20a%20system%20to%20all%20the%20employes.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERight%20now%2C%20i'm%20importing%20the%20contacts%20to%20a%20generic%20account%20using%26nbsp%3BImport-ContactList%20and%20Search-mailbox%20to%20delete%20each%20time%20because%20it's%20creating%20duplicates%20instead%20of%20updating%20the%20existing%20ones%2C%20and%20then%20I%20add%20the%20generic%20account%20to%20all%20mobile%20phone%20using%20our%20mdm.%3C%2FP%3E%3CP%3EIt's%20working%20but%20it's%20really%20not%20the%20best...%3CBR%20%2F%3EAny%20way%20with%20powershell%20in%20365%20to%20EDIT%20a%20contact%20inside%20a%20mailbox%20%3F%20that%20way%20I%20could%20manage%20it%20without%20having%20the%20delete%20everything%20before%20pushing%20the%20changes...%3C%2FP%3E%3CP%3Ethank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-310337%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-310348%22%20slang%3D%22en-US%22%3ERe%3A%20Office%20365%20-%20Contacts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-310348%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20your%20quick%20answer.%3C%2FP%3E%3CP%3EYes%20GAL%20would%20be%20easy%20but%20with%20more%20than%201500%2B%20employees%2C%20I%20need%20to%20push%20by%20departments%20or%20it%20will%20be%20too%20craazy...%3CBR%20%2F%3EI'll%20check%20EWS%2C%20I%20tough%20it%20was%20only%20for%20onprem%20not%20365%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20again%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-310344%22%20slang%3D%22en-US%22%3ERe%3A%20Office%20365%20-%20Contacts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-310344%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20want%20to%20share%20them%20with%20everyone%20in%20the%20company%2C%20the%20best%20place%20to%20put%20them%20is%20the%20GAL%20by%20creating%20a%20mail%20contact%20entries.%20Or%20if%20you%20don't%20want%20to%20clutter%20the%20GAL%2C%20something%20like%20a%20PF%20Contacts%20folder%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.cogmotive.com%2Fblog%2Foffice-365-tips%2Fcreate-a-company-shared-contacts-folder-in-office-365%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.cogmotive.com%2Fblog%2Foffice-365-tips%2Fcreate-a-company-shared-contacts-folder-in-office-365%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20insist%20on%20storing%20them%20in%20a%20mailbox%2C%20you%20will%20need%20some%20EWS-based%20script%2C%20such%20as%20the%20one%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.allabout365.com%2F2010%2F07%2Fusing-powershell-to-import-contacts-into-exchange-and-outlook-live%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.allabout365.com%2F2010%2F07%2Fusing-powershell-to-import-contacts-into-exchange-and-outlook-live%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hello, I have a small project to sync contact that we have in a system to all the employes.

 

Right now, i'm importing the contacts to a generic account using Import-ContactList and Search-mailbox to delete each time because it's creating duplicates instead of updating the existing ones, and then I add the generic account to all mobile phone using our mdm.

It's working but it's really not the best...
Any way with powershell in 365 to EDIT a contact inside a mailbox ? that way I could manage it without having the delete everything before pushing the changes...

thank you!

2 Replies
Highlighted
Best Response confirmed by Jean-Philippe_Bergeron (New Contributor)
Solution

If you want to share them with everyone in the company, the best place to put them is the GAL by creating a mail contact entries. Or if you don't want to clutter the GAL, something like a PF Contacts folder: https://www.cogmotive.com/blog/office-365-tips/create-a-company-shared-contacts-folder-in-office-365

 

If you insist on storing them in a mailbox, you will need some EWS-based script, such as the one here: https://www.allabout365.com/2010/07/using-powershell-to-import-contacts-into-exchange-and-outlook-li...

Highlighted

Thank you for your quick answer.

Yes GAL would be easy but with more than 1500+ employees, I need to push by departments or it will be too craazy...
I'll check EWS, I tough it was only for onprem not 365

 

Thank you again