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

Error since 15.03.2022 #52

Open
mandelbrotmedia opened this issue Mar 18, 2022 · 6 comments
Open

Error since 15.03.2022 #52

mandelbrotmedia opened this issue Mar 18, 2022 · 6 comments

Comments

@mandelbrotmedia
Copy link

mandelbrotmedia commented Mar 18, 2022

Hi,

since last tuesday 15.03.2022 i get the following error:

2022.03.18 07:00:33 INFO Beginning contact sync for name@domain.com'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?

@paochiz
Copy link

paochiz commented Mar 23, 2022

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

@grahamr975
Copy link
Owner

grahamr975 commented Mar 23, 2022

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

@mandelbrotmedia
Copy link
Author

mandelbrotmedia commented Mar 29, 2022

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

@paochiz
Copy link

paochiz commented Mar 29, 2022 via email

@JimSnead
Copy link

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

#56 (comment)

@grahamr975
Copy link
Owner

grahamr975 commented Sep 13, 2022

@paochiz and others,

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

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

4 participants