Skip to Content
Menu
This question has been flagged
3 Replies
11480 Views

Trying to enable OAuth2 login with our Azure AD, currently stuck with this error: AADSTS50001: Resource identifier is not provided.

It seems that there is a difference in AAD's implementation of OAuth2 as they have "Resources" instead of scope. Has anyone been successful in integrating AAD Outh2 with odoo 10? 

Avatar
Discard
Best Answer

Appreciate it's an old thread but still Odoo (as of V16) does not officially support Azure AD for OAUTH.
However this very simple open-source module does and works with most versions.
I've used it for many years and been involved in the testing / documentation of it.
odoonz-addons/auth_oauth_microsoft_graph at 15.0 · odoonz/odoonz-addons (github.com)

Avatar
Discard
Best Answer

Hello

I found this information https://www.odoo.com/documentation/master/applications/general/auth/azure.html, this error is because Odoo does not support connection with oauth microsoft azure.

Avatar
Discard
Author Best Answer

i've managed to reconfigure and allow to authenticate using Microsoft Graph with the sign in and read profile but now getting:


2017-09-07 03:18:47,468 12070 INFO theasiaodoo werkzeug: 127.0.0.1 - - [07/Sep/2017 03:18:47] "GET /auth_oauth/signin HTTP/1.1" 200 - 2017-09-07 03:18:48,062 12070 ERROR theasiaodoo odoo.addons.auth_oauth.controllers.main: OAuth2: HTTP Error 401: Unauthorized Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/odoo/addons/auth_oauth/controllers/main.py", line 139, in signin

    credentials = env['res.users'].sudo().auth_oauth(provider, kw)

  File "/usr/lib/python2.7/dist-packages/odoo/addons/auth_oauth/models/res_users.py", line 104, in auth_oauth

    validation = self._auth_oauth_validate(provider, access_token)

  File "/usr/lib/python2.7/dist-packages/odoo/addons/auth_oauth/models/res_users.py", line 42, in _auth_oauth_validate

    validation = self._auth_oauth_rpc(oauth_provider.validation_endpoint, access_token)

  File "/usr/lib/python2.7/dist-packages/odoo/addons/auth_oauth/models/res_users.py", line 34, in _auth_oauth_rpc

    f = urllib2.urlopen(url)

  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen

    return opener.open(url, data, timeout)

  File "/usr/lib/python2.7/urllib2.py", line 435, in open

    response = meth(req, response)

  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response

    'http', request, response, code, msg, hdrs)

  File "/usr/lib/python2.7/urllib2.py", line 473, in error

    return self._call_chain(*args)

  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain

    result = func(*args)

  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default

    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

HTTPError: HTTP Error 401: Unauthorized 2017-09-07 03:18:48,063 12070 INFO theasiaodoo werkzeug: 127.0.0.1 - - [07/Sep/2017 03:18:48] "GET /auth_oauth/signin?access_token=eyJ0eXAiOiJKV1QiLCJub25jZSI6IkFRQUJBQUFBQUFBOWtUa2xoVnk3U0pUR0F6Ui1$2017-09-07 03:18:48,253 12070 INFO theasiaodoo werkzeug: 127.0.0.1 - - [07/Sep/2017 03:18:48] "GET /web/login?oauth_error=2 HTTP/1.1" 200 - 2017-09-07 03:18:48,552 12070 INFO theasiaodoo werkzeug: 127.0.0.1 - - [07/Sep/2017 03:18:48] "POST /website/translations HTTP/1.1" 200 -

-----

settings are

ODOO:

ClientID: AAD App ID

Authentication URL: https://login.microsoftonline.com/[tenant]/oauth2/authorize?resource=https%3A%2F%2Fgraph.microsoft.com&

Validation URL: https://login.microsoftonline.com/b4ee2b10-c018-4d42-abb0-5754023fc6cc/oauth2/token (also tried https://graph.microsoft.com/v1.0/me but no go)


Any help would be appreciated, thanks


Avatar
Discard

Hi Qiqo,

I'm curious to know if you ever solved this problem. I have been stuck with the same error while attempting to setup OAuth2 and AzureAD.

V/R,

Evan

I have the same problem.Did you solve this problem?

Related Posts Replies Views Activity
0
Dec 24
28
2
Oct 23
1677
1
Jul 23
2440
0
Jul 21
13743
1
Nov 15
7114