Hi, I'm trying to run the script as is with my global admin account on my regular user account, gets the following. You have any tip?
2020-10-12 09:33:43 INFO Beginning contact sync for myname@domain's mailbox
VERBOSE: Loading module from path 'C:\scripts\EWS-Office365-Contact-Sync-master\EWSContacts\Module\bin\Microsoft.Exchange.WebServices.dll'.
VERBOSE: Using EWS dll from Local Directory
VERBOSE: Using Modern Auth
VERBOSE: Loading module from path 'C:\scripts\EWS-Office365-Contact-Sync-master\EWSContacts\Module\bin\Microsoft.IdentityModel.Clients.ActiveDirectory.dll'.
PS>TerminatingError(New-Object): "A constructor was not found. Cannot find an appropriate constructor for type Microsoft.Exchange.WebServices.Data.OAuthCredentials."
TerminatingError(New-Object): "A constructor was not found. Cannot find an appropriate constructor for type Microsoft.Exchange.WebServices.Data.OAuthCredentials."
TerminatingError(New-Object): "A constructor was not found. Cannot find an appropriate constructor for type Microsoft.Exchange.WebServices.Data.OAuthCredentials."
2020-10-12 09:33:44 ERROR Failed to Sync-ContactList for myname@domain.com A constructor was not found. Cannot find an appropriate constructor for type Microsoft.Exchange.WebServices.Data.OAuthCredentials.
Windows PowerShell transcript end
End time: 20201012093344
You may need to unblock the included .dll files. To do this, navigate to EWSContacts\Module\bin -> For each .dll file, right-click on the file -> Check 'Unblock'
Global admin is not enough, you also need to give the account application impersonation permissions.
Hi, I'm trying to run the script as is with my global admin account on my regular user account, gets the following. You have any tip?
2020-10-12 09:33:43 INFO Beginning contact sync for myname@domain's mailbox VERBOSE: Loading module from path 'C:\scripts\EWS-Office365-Contact-Sync-master\EWSContacts\Module\bin\Microsoft.Exchange.WebServices.dll'. VERBOSE: Using EWS dll from Local Directory VERBOSE: Using Modern Auth VERBOSE: Loading module from path 'C:\scripts\EWS-Office365-Contact-Sync-master\EWSContacts\Module\bin\Microsoft.IdentityModel.Clients.ActiveDirectory.dll'. PS>TerminatingError(New-Object): "A constructor was not found. Cannot find an appropriate constructor for type Microsoft.Exchange.WebServices.Data.OAuthCredentials."