Problem/Motivation

Now it is not possible to use multiple connectors for Office 365, it is will be helpful for users from different organisations.

Proposed resolution

1. Create config entity type to make possible create multiple connectors.
2. Existing configurations set as "default" entity.

Data model changes

Issue fork o365-3240633

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tBKoT created an issue. See original summary.

tbkot’s picture

Status: Active » Needs review
tbkot’s picture

fabianderijk’s picture

This looks promising. I'll take a look at the merge request and let you know.

Currently we are working on a better 3.x branch so, if this patch works, i'll add it to the new branch as well.

fabianderijk’s picture

Assigned: Unassigned » fabianderijk
rolki’s picture

It would be grate to have this change in 3.x. The only thing that we probably should do is deprecate current configuration settings since we already will have configuration entities instead.

rolki’s picture

I reviewed changes, fixes some things (CS and use capabilities of PHP 7.1). See https://git.drupalcode.org/project/o365/-/merge_requests/8/diffs?commit_...
Changes look good to me, but anyway we should retest it I guess.

tbkot’s picture

rolki’s picture

Hi, are there any update here? Have you been able to view the changes?

robertragas’s picture

Attached a patch for the dev 3.x branch.

  • fabianderijk committed 7229da4 on 2.0.x authored by tBKoT
    Issue #3240633: Make possible to use multiple Office 365 connectors
    
fabianderijk’s picture

I've just pushed the 2.0.x branch, and currently are looking at the patch for the 3.0.x branch.

fabianderijk’s picture

I've created a new MR for the 3.0.x branch. Currently the login is not working correctly with the patch. This still needs some work.

https://git.drupalcode.org/project/o365/-/merge_requests/11

ronaldtebrake’s picture

I've added remarks on the MR, just noticed at least one fix from the MR that broke the login in the patch.
So for reference sake here is an interdiff and patch update from 11, with that feedback in mind.

fabianderijk’s picture

I've worked on this issue in the merge request. For me, the code there works. Here's the patch so you test this as well.

Let me explain some things as well:
* The client ID, secret, etc are removed from the entity. They are saved and loaded from the settings.php. This is done because of safety reasons.
* The scope is automatically generated from the implemented hook_o365_auth_scopes() hooks.

fabianderijk’s picture

Here's an updated patch based on the work in 3.0.x we have done the last days.

codebymikey’s picture

One thing of note is that although this was released as part of a patch release from 2.0.4 -> 2.0.5, it actually breaks existing installations since they'll need update their Active Directory Redirect URIs to point to /o365/callback/default rather than /o365/callback going forward.

So it'd be helpful if the release note could mention this. One way to avoid the breaking change might be to provide a default route for /o365/callback which redirects to the first connector it can find or "default" if it's available.

bramdriesen’s picture

Title: Make possible to use multiple Office 365 connectors » Make it possible to use multiple Office 365 connectors
Issue summary: View changes

Fix typos

rolki’s picture

Version: 2.0.x-dev » 3.0.x-dev
Status: Needs review » Needs work
rolki’s picture

Version: 3.0.x-dev » 2.0.x-dev
rolki’s picture

All next work with adding this functionality will be done within https://www.drupal.org/project/o365/issues/3240633, I would propose to close this ticket and continue communication in new one.

rolki’s picture

Status: Needs work » Closed (duplicate)
bramdriesen’s picture

Status: Closed (duplicate) » Needs review

You linked to this issue? And it has a merged commit, so I would not close this one as a duplicate actually.

fabianderijk’s picture

Status: Needs review » Closed (duplicate)

I'm closing this as an duplicate. The linked issue has been fixed . The 2.x branch isn't supported anymore.