コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POS店舗
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 承認
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具専門店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • 醸造所
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • 会計
  • 在庫
  • PoS
  • プロジェクト
  • MRP
All apps
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

Odoo 17 Microsoft SSO oauth Integration

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
oauthssomicrosoftoauth2Controller
3970 ビュー
アバター
Abhinav Bajimaya


I am trying to integrate microsoft azure with Odoo. I think all the keys through the azure portal is configured correctly.  "client id and client secret"

Ive managed to get the sign-in with Microsoft button on the login page. On clicking it, the page is redirected to '/authorize' page where you enter the username and password. 

Microsoft then redirects to this link GET on /microsoft_sso_integration/microsoft?code=something&state="something", which is all good according to the docs.

The problem is that  the query parameters here are not accessible through the *kw args. 
I try to check the kw value, but it returns empty when clearly it should be the code and state value returned by Microsoft.

This breaks the entire login flow of the code and I cant seem to figure out whats wrong here.

here is the auth controller 

class MicrosoftRoute(http.Controller):

  •     @http.route('/microsoft_sso_integration/microsoft', type='http', auth='none')
  •     @fragment_to_query_string    
  •     def azure_return(self, **kw):   
  •         state = json.loads(kw['state'])
  •         # make sure request.session.db and state['d'] are the same,
  •         # update the session and retry the request otherwise
  •         dbname = state['d']
  •         if not http.db_filter([dbname]):
  •             return BadRequest()
  •         ensure_db(db=dbname)

  •         provider = state['p']
  •         request.update_context(**clean_context(state.get('c', {})))
  •         _logger.info('outside try block')
  •         try:
  •             # auth_oauth may create a new user, the commit makes it
  •             # visible to authenticate()'s own transaction below
  •             _, login, key = request.env['res.users'].with_user(SUPERUSER_ID).auth_oauth_microsoft(provider, kw)
  •             _logger.info(str(login) + ' ' + str(key) + ' ' + str(dbname))
  •             request.env.cr.commit()
  •             action = state.get('a')
  •             menu = state.get('m')
  •             
  •             redirect = werkzeug.urls.url_unquote_plus(state['r']) if state.get('r') else False
  •             url = '/web'
  •             if redirect:
  •                 url = redirect
  •             elif action:
  •                 url = '/web#action=%s' % action
  •             elif menu:
  •                 url = '/web#menu_id=%s' % menu
  •             _logger.info(str(dbname) + ' ' + str(login) + ' ' + str(key))
  •             pre_uid = request.session.authenticate(dbname, login, key)
  •             resp = request.redirect(_get_login_redirect_url(pre_uid, url), 303)
  •             resp.autocorrect_location_header = False

  •              # Since /web is hardcoded, verify user has right to land on it
  •             if werkzeug.urls.url_parse(resp.location).path == '/web' and not request.env.user._is_internal():
  •                 resp.location = '/'
  •             return resp
  •         except AttributeError:
  •             # auth_signup is not installed
  •             _logger.error("auth_signup not installed on database %s: oauth sign up cancelled." % (dbname,))
  •             url = "/web/login?oauth_error=1"
  •         except AccessDenied:
  •             # oauth credentials not valid, user could be on a temporary session
  •             _logger.info('OAuth2: access denied, redirect to main page in case a valid session exists, without setting cookies')
  •             url = "/web/login?oauth_error=3"
  •             redirect = werkzeug.utils.redirect(url, 303)
  •             redirect.autocorrect_location_header = False
  •             return redirect
  •         except Exception:
  •             # signup error
  •             _logger.exception("Exception during request handling")
  •             url = "/web/login?oauth_error=2"

  •         redirect = request.redirect(url, 303)
  •         redirect.autocorrect_location_header = False
  •         return redirect

      
0
アバター
破棄
ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
関連投稿 返信 ビュー 活動
automatically create user for users logging in via single sign on
oauth sso oauth2 Oauth SSO
アバター
0
7月 24
2749
Odoo OAuth (Lark SSO): How to Support Multiple Browser Logins Without Session Conflict?
development oauth sso
アバター
0
6月 25
1207
Google oauth
oauth oauth2 googlelogin
アバター
0
12月 23
2347
Unable to install "OAuth2 Authentication" addon - Parse error? Field "in_group_14" does not exist in model "res.users"?
authentication sso oauth2
アバター
0
10月 21
4181
OAuth with OpenAM (SSO)
oauth sso OpenAm
アバター
アバター
2
3月 15
3796
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育プログラム
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now