EWS-Office365-Contact-Sync icon indicating copy to clipboard operation
EWS-Office365-Contact-Sync copied to clipboard

Error since 15.03.2022

Open mandelbrotmedia opened this issue 2 years ago • 6 comments

Hi,

since last tuesday 15.03.2022 i get the following error:

2022.03.18 07:00:33 INFO Beginning contact sync for [email protected]'s mailbox AUSFÜHRLICH: Using EWS dll from Local Directory AUSFÜHRLICH: Using Modern Auth AUSFÜHRLICH: Modul wird aus Pfad "C:\EWS-Office365-Contact-Sync\EWSContacts\Module\bin\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" geladen. PS>TerminatingError(Get-EXCContactFolder): "Ausnahme beim Aufrufen von "Bind" mit 2 Argument(en): "The request failed. Die zugrunde liegende Verbindung wurde geschlossen: Unerwarteter Fehler beim Senden.."" AUSFÜHRLICH: COMPANY Kontakte not found, attempting to create now...

any idea whats wrong? did MS change something?

mandelbrotmedia avatar Mar 18 '22 06:03 mandelbrotmedia

Hi mee too :( Since 15/03/2022 it's not working :( Any help?

Write-Log : Failed to fetch Global Address List Contacts from Office 365 Directory In riga:77 car:3

  •     Write-Log -Level "FATAL" -Message "Failed to fetch Global Add ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Log

paochiz avatar Mar 23 '22 10:03 paochiz

I think I've seen this before in issue #46. If you recently enabled MFA in your environment, this could be the cause. Please see below. Others have had success by creating an Azure App.

This issue is from the ExchangeOnline Powershell Module and occurs for one of the following reasons:

  • You enter an incorrect user name or password.
  • You try to sign in to the service by using an account that doesn't have access to Exchange Online.
  • You have security defaults enabled in your tenant. Source

Note that the ExchangeOnline Powershell Module in this script still uses basic authentication. It's on my to-do list to migrate this over to OAuth just as I have done for the EWS portions.

We only use ExchangeOnline to retrieve the contacts, so if you're up to the challenge you could follow a guide like the one here to set up an AzureAD App. After that, you'd need to modify the function here: https://github.com/grahamr975/EWS-Office365-Contact-Sync/blob/master/EWSContacts/Module/functions/contacts/Get-GALContacts.ps1

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $ConnectionUri -Credential $Credentials -Authentication Basic -AllowRedirection

grahamr975 avatar Mar 23 '22 11:03 grahamr975

you are right, i activated MFA a feew weeks ago. but the script worked after that. now i found out that on my local windows 11 pc the script works without error. only on my server with windows server 2016 it stopped working since 15.03.2022.

i think it must be an issue with windows updates or some dependencies

mandelbrotmedia avatar Mar 29 '22 05:03 mandelbrotmedia

Sale problem

Dr. Paolo Chiorazzo

@.@.>

ALYA Infrastrutture x-apple-data-detectors://0/2Via Andrea Ercolani, 9x-apple-data-detectors://0/2 40026 Imola BOx-apple-data-detectors://0/2 Cell. +39 3319146264tel:+39%203319146264

+39 3881493152tel:+39%203881493152 http://www.alya.it/


Da: mandelbrotmedia @.> Inviato: Tuesday, March 29, 2022 7:47:02 AM A: grahamr975/EWS-Office365-Contact-Sync @.> Cc: Paolo Chiorazzo @.>; Comment @.> Oggetto: Re: [grahamr975/EWS-Office365-Contact-Sync] Error since 15.03.2022 (Issue #52)

you are right, i activeted MFA a feew weeks ago. but the script worked after that. now i found out that on my local windows 11 pc the script works without error. only on my server with windows server 2016 it stopped working since 15.03.2022.

i think it must be an issue with windows updates or some dependencies

— Reply to this email directly, view it on GitHubhttps://github.com/grahamr975/EWS-Office365-Contact-Sync/issues/52#issuecomment-1081428934, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALXWGN7SBNROZGSTPYZN5PLVCKKNNANCNFSM5RA6LRIQ. You are receiving this because you commented.Message ID: @.***>

paochiz avatar Mar 29 '22 05:03 paochiz

Here is a link to my comment about a fix for the "Failed to fetch Global Address list contacts" error.

https://github.com/grahamr975/EWS-Office365-Contact-Sync/issues/56#issuecomment-1198509331

JimSnead avatar Jul 28 '22 23:07 JimSnead

@paochiz and others,

Could you try the latest version (commit 9fcfe1f06192848882564615dd9aa05e71d69970) and see if this fixes your issues?

grahamr975 avatar Sep 13 '22 13:09 grahamr975