Comments (14)
I am aware of this depreciation and do plan to add OAuth support.
from ews-office365-contact-sync.
I second this request :-)
from ews-office365-contact-sync.
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.
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.
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.
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.
@toddjames Thanks Todd. I'm glad you were able to find a solution that works for your environment.
from ews-office365-contact-sync.
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.
@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.
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.
@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.
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.
@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.
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)
- Unable to Sync Contacts on Mobiles.
- Contact photos (thumbnails) and address not shown in Business Cards HOT 1
- switches not syncing intended users HOT 9
- Failed to Sync-ContactList - Internet Explorer engine is not available HOT 2
- ExcludeSharedMailboxContacts excluding many (real) Users HOT 4
- FATAL Failed to fetch Global Address List Contacts from Office 365 Directory Expired or Invalid pagination request. Default Expiry time is 00:30:00 HOT 1
- Failed to fetch Global Address List Contacts from Office 365 Directory - Assembly "System.Net.Http, Version=4.2.0.0 HOT 1
- FolderName = Subfolder of default contacts HOT 2
- Requesting Support for EWS-Office365-Contact-Sync Script HOT 2
- Only contacts with MobilePhone HOT 1
- Better details in docs HOT 1
- Howto specify more than one mailbox to sync from command line ? HOT 5
- Issue adding Fax and Pager fields to the contacts HOT 1
- EWSContactSync.ps1 : Cannot convert the "System.Management HOT 2
- Failed verify that Directory Contacts exists HOT 2
- Could not load file or assembly 'System.Net.Http, Version=4.2.0.0 HOT 4
- Scripts Exceptions in Catch and Get-GALContacts HOT 2
- Sync contacts to the default folder name. HOT 1
- Apply the script only user mailboxes HOT 3
- Identifying errors in the log HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ews-office365-contact-sync.