Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FolderName = Subfolder of default contacts #83

Open
fuegnera opened this issue May 11, 2023 · 2 comments
Open

FolderName = Subfolder of default contacts #83

fuegnera opened this issue May 11, 2023 · 2 comments

Comments

@fuegnera
Copy link

Hi,

is there a possibility to sync the contects in a subfolder of the default contacts? f.e. contacts/internal

I tried \Contacts\internal, Contacts\internal, Contacts/internal.. everytime I get a folder in the root: 'contacts\internal'

thank you
Achim

@JihadSaleh
Copy link

JihadSaleh commented Jun 20, 2023

I would like to also know this, it would help as we are already using a subfolder for contacts ofmobile users and it would be nice if we can get that updated instead of the root path.

@JihadSaleh
Copy link

JihadSaleh commented Jun 21, 2023

I found that if you want your root folder to be under the contacts folder.

You need to modify two scripts:-

In EWS-Office365-Contact-Sync\EWSContacts\Module\functions\folder\New-EXCContactFolder.ps1 File
Changes these two lines:-

$ContactsFolder.Save([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot)
$RootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service, Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot)

To these two lines:-
$ContactsFolder.Save([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Contacts)
$RootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($service,[Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Contacts)

In EWS-Office365-Contact-Sync\EWSContacts\Module\functions\folder\Get-EXCContactFolder.ps1 File
From this:-
$folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::MsgFolderRoot, $MailboxName)

To This:-
$folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Contacts, $MailboxName)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants