From 5fa618cb99b785eb2eede0059b5ab6251f832ceb Mon Sep 17 00:00:00 2001 From: Arnaud Joset Date: Fri, 11 Aug 2023 13:16:33 +0200 Subject: [PATCH] [FIX] microsoft_account: remove approval consent when admin use 2FA on Microsoft Azure. Before this commit, when the Database is using an enterprise Azure account/environment which has a configuration of 'Multifactor authentication', the users gets pop-up asking for approval. See https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/application-sign-in-unexpected-user-consent-prompt The solution is to remove the parameter 'prompt': 'consent' from the authentication URL which is not considered a good practice by the Microsoft support (see attachment in task). closes odoo/odoo#139075 Taskid: 3463417 X-original-commit: 1e1f84531b37f7f256f8a8670ed7efddae6fe1ba Signed-off-by: Arnaud Joset (arj) --- addons/microsoft_account/models/microsoft_service.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/microsoft_account/models/microsoft_service.py b/addons/microsoft_account/models/microsoft_service.py index 484ed312f29..9383f7758dc 100644 --- a/addons/microsoft_account/models/microsoft_service.py +++ b/addons/microsoft_account/models/microsoft_service.py @@ -89,7 +89,6 @@ class MicrosoftService(models.AbstractModel): 'state': json.dumps(state), 'scope': scope, 'redirect_uri': base_url + '/microsoft_account/authentication', - 'prompt': 'consent', 'access_type': 'offline' }) return "%s?%s" % (self._get_auth_endpoint(), encoded_params)