I’m considering moving to SuiteCRM but I’m seeing lots of comments about issues with the Outlook Plug and Microsoft 2FA etc when linked to Outlook 365 on Exhange365 for Business Cloud hosting (our specific setup) …
Is this set of issues now resolved or reliable and robust work arounds in place?
It’s key to know that emails will sync both ways seamlessly AND contacts will sync too
Really appreciate confirmation that this can be done without major issues.
Many thanks
Richard
pgr
12 December 2022 12:00
2
There is a significant improvement to emails configuration coming in soon, probably in the next version. This will be a game-changer in terms of Microsoft Oauth logins.
So, I’d say, wait just a bit longer and then run some tests.
Thanks, good to know. Is there an ETA at all? 2023 for sure? a Qx?
Just want to start running tests on the CRM but not if the email integration is missing
pgr
12 December 2022 12:42
4
The PR has been proposed but it’s not merged yet. PRs sometimes take years to get merged.
However, this was a 2 or 3 weeks sprint by the lead developer, I am 99% sure it will be merged and released very soon.
salesagility:develop
← clemente-raposo:feature/emails-oauth
opened 04:17PM - 05 Dec 22 UTC
<!--- Please be aware that as of the 31st January 2022 we no longer support 7.10… .x.
New PRs to hotfix-7.10.x will be invalid. If your fix is still applicable to 7.12.x,
please create the pull request to the hotfix branch accordingly. -->
## Description
#### Update External OAuth Connection Module
- Add config.php entry to allow adding oauth external providers
- Add ExternalOAuthConnection module to allow getting access through OAuth from external providers
- Allow setting up Security groups for ExternalOuthConnections Emails
![emails-oauth-external-oauth-connection](https://user-images.githubusercontent.com/1140849/205686020-0ef624de-cff9-41cf-b728-24795dac8ec6.png)
![emails-oauth-personal-external-oauth-connection-edit](https://user-images.githubusercontent.com/1140849/205686044-5d003c8e-5264-4717-b5e4-5b09a7aa5f50.png)
![emails-oauth-personal-external-oauth-connection-detail](https://user-images.githubusercontent.com/1140849/205686060-9a79467c-05ac-4705-8672-7dd6bb804a17.png)
#### Update Inbound Emails Module
- Update Inbound email module views to user regular view defs
- Allow creating Personal, Group and Bounce emails through InboundEmails create/edit view
- Remove inbound email configuration from profile view configurations
- Allow setting up Security groups for Inbound Emails
- Allow selecting between basic auth and oauth on inbound email configuration
- Allow selecting an external oauth connection as the connection to use for authenticating in Inbound emails
![emails-oauth-inbould-list-view](https://user-images.githubusercontent.com/1140849/205686142-363c77d1-42a3-4423-8d4a-b171f02efded.png)
![emails-oauth-personal-inbould-oauth](https://user-images.githubusercontent.com/1140849/205686165-7e3e2134-d182-455a-86e7-2671da3ad238.png)
![emails-oauth-personal-inbould-basic-auth](https://user-images.githubusercontent.com/1140849/205686278-721ca1ec-a50c-4e09-b95f-334b8bd144c8.png)
![emails-oauth-profile-view](https://user-images.githubusercontent.com/1140849/205686327-19444c17-aca4-44b3-a74b-45c5c31f6187.png)
![email-oauth-no-profile-personal-email-config](https://user-images.githubusercontent.com/1140849/205686340-b6d0a58e-b47c-40d3-a6a5-046e756d114d.png)
#### Update Outbound Emails Module
- Allow creating Personal outbound emails through Outbound email module create/edit view
- Remove outbound email configuration from profile view configurations
- - Allow setting up Security groups for Outbound Emails
![emails-oauth-oubound-listview](https://user-images.githubusercontent.com/1140849/205686462-c53929e7-6381-482a-96a2-c6098f1def99.png)
![emails-oauth-personal-outbound](https://user-images.githubusercontent.com/1140849/205686475-21b58cf4-f20e-4fdf-8202-0f1c2dfd19b1.png)
#### Update IMAP connection library | Allow connecting with xoauth
- Add imap2 lib to handle in order to support xoauth login in imap
- Add Imap2Handler to be used to connect to IMAP for Oauth connections
https://user-images.githubusercontent.com/1140849/205695529-099579bd-d24a-4564-a5ef-659bbd03e4fb.mp4
## Motivation and Context
- Allow connecting to IMAP using OAuth connections
- Fix some bugs in current inbound and outbound email Configuration
## How To Test This
1. Configure a Microsoft connection provider using the following config.php configuration
```php
'external_oauth_providers' => [
'Microsoft' => [
'type' => 'Generic',
'client_id' => '<TO-REPLACE>',
'client_secret' => '<TO-REPLACE>',
'redirect_uri' => 'http://<TO-REPLACE>/index.php?entryPoint=setExternalOAuthToken',
'authorize_url_options' => [
'scope' => 'offline_access IMAP.AccessAsUser.All SMTP.Send User.Read',
],
'extra_provider_params' => [
'scopes' => 'offline_access imap.accessasuser.all smtp.send user.read',
'urlAuthorize' => 'https://login.microsoftonline.com/<TO-REPLACE>/oauth2/v2.0/authorize',
'urlAccessToken' => 'https://login.microsoftonline.com/<TO-REPLACE>/oauth2/v2.0/token',
'urlResourceOwnerDetails' => '',
'verify' => false
],
'get_token_request_grant' => 'authorization_code', // optional
'get_token_request_options' => [], // optional
'token_mapping' => [ // optional
'access_token' => 'access_token',
'expires_in' => 'expires_in',
'refresh_token' => 'refresh_token',
'token_type' => 'values.token_type'
]
],
],
```
2. Go to Profile > External OAuth connection module and create new personal connection
3. Select Microsoft > Click Authenticate > Popup should appear
4. Add your credentials > Authorize > Connection fields should be field in with token information
5. Add a name > Save
6. Go to InboundEmail record
7. Change Auth Type from basic to OAuth
8. You should be able to see the records you and the ones you have access to by security groups
9 . Select a record > Save > The record should correctly save
10. Go to emails module. You should be able to see the emails sorted by received date
11. Try the filter panel you should be able to filter
12. You should not be able to sort or set sorting direction
13. You should be able to mark emails as read and unread
14. You should be able to flag and un-flag emails
15. You should be able to delete emails
16. You should be able to import emails
17. you should be able to go to the email detail view page
18. You should be able to see the email information in the detail view page
19 Configure a group inbound emails. You will need to create a group ExternalOauthConnection
20. Auto email import for cases should work for group emails
21. Inbound email repair should work
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
### Final checklist
- [x] My code follows the code style of this project found [here](https://docs.suitecrm.com/community/contributing-code/coding-standards/).
- [x] My change requires a change to the documentation.
- [x] I have read the [**How to Contribute**](https://docs.suitecrm.com/community/contributing-code/) guidelines.
You can keep an eye on it there on Github.