Giter Club home page Giter Club logo

Comments (14)

grahamr975 avatar grahamr975 commented on May 31, 2024 2

I am aware of this depreciation and do plan to add OAuth support.

from ews-office365-contact-sync.

rypto avatar rypto commented on May 31, 2024

I second this request :-)

from ews-office365-contact-sync.

grahamr975 avatar grahamr975 commented on May 31, 2024

Hello,

Can you try testing this Oauth migration branch? Let me know how this works for you.
https://github.com/grahamr975/EWS-Office365-Contact-Sync/tree/oauth_migration

from ews-office365-contact-sync.

teconmoon avatar teconmoon commented on May 31, 2024

Good morning, I am looking into testing this OAuth branch. Is the process for exporting credentials still the same as basic auth?

Edit: Nevermind, stupid question as it's obvious I did zero reading about OAuth.

from ews-office365-contact-sync.

teconmoon avatar teconmoon commented on May 31, 2024

Alright take two: Created an app within the Azure AD Portal, granted the Exchange permission Contacts.ReadWrite.All as delegate permission since the script still requires a user account, and got the Client ID for the script, I generated a client secret string but not sure if that's needed for use within the context of the script as there's no parameter for it. Ran through and got the following error:

A constructor was not found. Cannot find an appropriate constructor for type Microsoft.Exchange.WebServices.Data.OAuthCredentials.

Logs attached with organization-specific information removed.
PowerShell_transcript.IT-2087.FnYevNxF.20200720080600.txt

On an aside, if the script supported just using a client ID and secret without the need for any user account that might end up being the best way to go.

from ews-office365-contact-sync.

toddjames avatar toddjames commented on May 31, 2024

Hi Graham,
I won't be able to help with the testing of this new feature. We decided to go another direction with a commercial product, but I commend your commitment to getting this working for the OSS community.

from ews-office365-contact-sync.

grahamr975 avatar grahamr975 commented on May 31, 2024

@toddjames Thanks Todd. I'm glad you were able to find a solution that works for your environment.

from ews-office365-contact-sync.

grahamr975 avatar grahamr975 commented on May 31, 2024

Following Microsoft's document here, I was able to make a test account with Legacy EWS Authentication disabled. You can do this using the below script. You must use an Office 365 admin account.

$Credentials = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 'https://outlook.office365.com/powershell-liveid/' -Credential $Credentials -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking -AllowClobber
New-AuthenticationPolicy -Name "Disable Legacy EWS Auth Test" -AllowBasicAuthActiveSync -AllowBasicAuthAutodiscover -AllowBasicAuthImap -AllowBasicAuthMapi -AllowBasicAuthOfflineAddressBook -AllowBasicAuthOutlookService -AllowBasicAuthPop -AllowBasicAuthPowershell -AllowBasicAuthReportingWebServices -AllowBasicAuthRpc -AllowBasicAuthSmtp
Set-User -Identity "[email protected]" -AuthenticationPolicy "Disable Legacy EWS Auth Test"
Remove-PSSession $Session

The ModernAuth mode is still working with legacy authentication disabled.

from ews-office365-contact-sync.

grahamr975 avatar grahamr975 commented on May 31, 2024

@teconmoon You don't need to create an app in Azure at this time. All you need is an account with application impersonation permissions. See the 'read me' file in the oauth branch for more information.

from ews-office365-contact-sync.

tardispilot avatar tardispilot commented on May 31, 2024

I get the same issue as teconmoon . I am using a user account (with App Password set up due to enforced MFA on user account.) User is admin with impersonate. Stepping through the code, the issue seems to be on line 98 of Connect-EXCEchange.ps1. $token is null. Not sure if this is because what I'm submitting is technically not my password, rather an App Password. Could support for App Passwords be included also if this is the case?

from ews-office365-contact-sync.

grahamr975 avatar grahamr975 commented on May 31, 2024

@tardispilot Looking at the Microsoft reply here to a similar question, it's not possible to use an app password with custom .net applications. They're only usable for legacy Microsoft applications like Outlook.

from ews-office365-contact-sync.

mathieudev avatar mathieudev commented on May 31, 2024

Hi Graham,
I won't be able to help with the testing of this new feature. We decided to go another direction with a commercial product, but I commend your commitment to getting this working for the OSS community.

Hi @toddjames, May I ask you the name of the commercial product?

from ews-office365-contact-sync.

toddjames avatar toddjames commented on May 31, 2024

@mathieudev I don't think it'd be appropriate to advertise here unless @grahamr975 agrees. Lacking a GitHub messaging system, feel free to email me at my first name @ my domain (as seen on my GitHub profile).

from ews-office365-contact-sync.

grahamr975 avatar grahamr975 commented on May 31, 2024

Verified modern auth is now working with new instructions. See the latest script and README file for more information.

from ews-office365-contact-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.