Enabling Modern Auth (OAuth 2.0) for service mailbox

lock
push_pin
done
Answered
3

Hi! 
I am about to test out Modern auth (OAuth 2.0) for a customer in their test-environment.

System upgraded to 10.1.2

 

I did see this post talking about issues if same serial was activated 2 times ?

OAuth 2.0 Service mailbox - invalid client_id (superoffice.com)

https://community.superoffice.com/en/forums/pilot-program/previous-pilot-programs/oauth-2.0-for-superoffice/oauth-2.0-service-mailbox---invalid-client_id/

 

How are we suposed to handle test/prod environements using the same serialnumber after activating Modern Auth (OAuth2)

Some of our customers have a separate test-environment that is production dump with separate mailbox(es) for testing of service , forms, and mailing, inbox etc. I mean If i test out modern auth in the test-environment that will, if I understand correctly, block the activation in the Production Environment?

 

If Possible, you should allow 2 registrations per serial , so that a test-environment can co-exist with a production envrionment. It would also be nice with some sort of partner-self-service for checking/unblocking a serialnumber. (Maybe that would possible in the new devloper portal somehow)

 

Since there will be a lot of preasure on upgrades for on prem customers until october, when MS starts the deactivation of Basic Auth for MAPI,POP,EWS protocols.

 

How do I switch a mailbox from MAPI(S) to modern auth?

Just "change auth" button?

Or do I need to recreate the mailbox from scratch?

 

It would help with a conversion-guide for MAPIS => Modern Auth?
Does one exist?

What must be prepared on the M365 side for a certain dedicated service email-box?

 

Best regards

Anders

5 Aug 2022 | 09:21 AM

All Replies (3)

Hi Anders,

Maybe you can request a separate SuperOffice serial nr for the test enviroment? As far as I know the SuperOffice serial nr is used as unique key when registering the SuperOffice environment in the 'access gateway' used by SuperOffice for authorizing OnSite environments using OAuth to access the Microsoft 365 Api.

You can switch a service mailbox to using OAuth by clicking the 'Change OAuth' button when opening the service mailbox. For this to be able to work make sure you have user credentials that directly authorize you on the mailbox, not an user which has access to it as a shared mailbox. You also need to make sure the DNS records and UPN is setup correctly so that SuperOffice can identify the mailbox correctly (see https://docs.superoffice.com/email/service.html#oauth-20)

 

5 Aug 2022 | 10:16 AM
Thanks for you answer David.
A separate license for customer test environments might be a solution, but not optimal I think.
And thanks for the tip that it must be a real user, shared mailbox is still not good enough it seems. (that was on my todo list to test, but since I guess you have tested it, that saves me some time)

I would like to have an answer from RND on how we are supposed to handle test/prod environments when we start activating Modern Auth on service-mailboxes. If not 2 instance (1 test and 1 prod ) is possible I think OnPrem customers should get free extra serial key(s) to be used in test-environments. (preferably key-request via some sort of self service)

But now when I reconsider an extra serial for test will effect other 3rd party components and cause them to also issue new licensees for test so it absolutely not a preferred solution..

/Anders
9 Aug 2022 | 09:00 AM

No support for 2 duplicate onsite-env. to run OAuth 2.0 at the same time:
Onsite prod. env. --> Onsite test evn. - where using duplicate serial number - does not comply with the way  'access gateway' does its security today:
You need separate serial numbers for each site/DB to use OAuth/AccessGateway email authentication.

You shouldn't need separate serial numbers if you use app passwords instead of OAuth 2.0 in the second (...or third, or all) sites. Only the first site that tries to register with a given serial number will register successfully without manual assistance from Operations (via Support).

Basically, you need to change serial number to a unique one with the concequenses it have, or use app passwords instead of OAuth 2.0 (or get manual assistance from Operations (via Support) to activly change / delete serial number when customer wants to change from one onsite env. to another onsite evn.)

For customer who have 2 duplicate onsite-env. and already have OAuth 2.0 registered for "tenant a" and wish to change to use OAuth 2.0 to "tenant b":
* Alt. 1: For those who connect to Google mail services: use app passwords instead of OAuth 2.0 on "tenant b"
* Alt. 2: 'create' a new serial number and change to this new serial number on "tenant b". You may now use OAuth 2.0 for "tenant b":
* Alt. 3: register a support request, where you submit the serial number for "tenant a" and request to delete it from OAuth/AccessGateway - to be able to to use this serialnumber for another tenant. When you get confirmation the serial number is deleted, you may use OAuth 2.0 for "tenant b":

16 Aug 2022 | 11:05 AM
Hi Frode!
Thanks for the answer but I am still a bit confused.
Can you eleborate a bit between App Password and OAuth 2.0 ?
By App password do you mean classic basic auth over IMAPS or what am I missing here?
From what I have read it is a but to activate IMAPS over modern Auth and we then use the credentials for the mailbox we want to convert. Are there different options there in the authentication dialog.
I am not so worried about being able to convert an mailbox in customer prod environments. But my consern is when we have a test environment being dumped to test-environment. (Mailbox(s) changed to some test variant also in M365). Before this was quite esay to achive with basic auth. (even possible to change with a SQL-script if recall correct)

When activating moderna Auth (OAUTH 2.0 or App Password?) for a service mailbox, does the customer IT need to prepare something on the M365 end?

Would be great if you could hold short webinar around this for us partners and we could discuss different scenarios in more detail.
Since the servicemailbox for many customers is very important, I want a process that is a smooth as possible with minimal downtime. Thats why I need to have control of the process doing a switch and preferably be able to test it out in their test environments. (So if App Password can solve that I am interested to learn the correct way of first testing it out in test-environment and then in prod active the serial via access gateway)

Sory for my questions..
Anders
29 Aug 2022 | 03:49 PM

Turns out that Microsoft handles the App Password a bit differently than Google in terms of basic auth - and MS does not allow for usage of App Password in O365 (Cloud) from October 2022:

The use of App Passwords is dependent on basic authentication (meaning the application sends a username and password with every request, and those credentials are often stored or saved on the device). This type of authentication will be discontinued by Microsoft in October 2022

https://it.arizona.edu/news/service-changes-app-password-and-uaconnect365-authentication-processes#:~:text=The%20use%20of%20App%20Passwords,by%20Microsoft%20in%20October%202022.

So, the "alternative 1" will only be applicable towards Google unfortunately. (leaving you with only option 2 or 3 if you connect to Microsoft, or connect to Google in your test-evn. perhaps?)

Modern authentication is enabled by default in Exchange Online(and for tenants created before August 1, 2017, modern authentication is turned off by default for Exchange Online)
https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/enable-or-disable-modern-authentication-in-exchange-online

The customer also need to make sure the MX Record is pointing to the Microsoft® Exchange Online server.

  • If we recognize the UPN as an Microsoft 365 email account, we redirect you to Microsoft for authentication. Smart to check the UPN of a user.

https://docs.superoffice.com/email/Service.html

30 Aug 2022 | 10:18 AM

Add reply