Azure AD b2C - get The request to sign in was denied.

khanh 1 Reputation point
2022-06-10T13:34:52.25+00:00

Hi,

I'm trying to setup OAUTH Azure AD b2C for superset and I get a message The request to sign in was denied. after sign in.

Here is my setup from superset.
superset_config.py

from flask import session
from flask_appbuilder.security.manager import (
AUTH_DB,
AUTH_OAUTH,
AUTH_LDAP,
)
basedir = os.path.abspath(os.path.dirname(file))
ROW_LIMIT = 5000
SUPERSET_WORKERS = 4

AUTH_ROLE_ADMIN = 'admin'
AUTH_ROLE_PUBLIC = 'Public'

you can allow users to self register

AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "admin"

AUTH_TYPE = AUTH_OAUTH

SECRET_KEY = "My_secret_key_supert_is_great"
CSRF_ENABLED = True
OAUTH_PROVIDERS = [
{
"name": "azure",
"icon": "fa-windows",
"token_key": "access_token",
"remote_app": {
"client_id": os.environ.get("AZURE_APPLICATION_ID"),
"client_secret": os.environ.get("AZURE_SECRET"),
"api_base_url": "https://login.microsoftonline.com/2c337311-0b43-4ca6-afcc-53efcaee4d5f/oauth2",
"client_kwargs": {
"scope": "User.read name preferred_username email profile upn",
"resource": os.environ.get("AZURE_APPLICATION_ID"),
},
"request_token_url": None,
"access_token_url": "https://login.microsoftonline.com/2c337311-0b43-4ca6-afcc-53efcaee4d5f/oauth2/token",
"authorize_url": "https://login.microsoftonline.com/2c337311-0b43-4ca6-afcc-53efcaee4d5f/oauth2/authorize",
},
},
]

210303-1.jpg210276-2.jpg210268-3.jpg210250-4.jpg210269-5.jpg210285-6.jpg210286-7.jpg210331-8.jpg210322-9.jpg210189-10.jpg210277-11.jpg210190-12.jpg210278-13.jpg210332-14.jpg210279-15.jpg210220-16.jpg210341-17.jpg

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,639 questions
0 comments No comments
{count} votes

15 answers

Sort by: Most helpful
  1. khanh 1 Reputation point
    2022-06-13T20:07:49.077+00:00

    I get a status interrupt :

    This is an expected part of the login flow, where a user is asked if they want to remain signed into this browser to make further logins easier. For more details, see https://techcommunity.microsoft.com/t5/Azure-Active-Directory/The-new-Azure-AD-sign-in-and-Keep-me-signed-in-experiences/td-p/128267

    0 comments No comments

  2. khanh 1 Reputation point
    2022-06-13T20:14:43.607+00:00

    Hi,

    I can see status interrupted on sign in .

    Continuous access evaluation :No
    Additional Details
    This is an expected part of the login flow, where a user is asked if they want to remain signed into this browser to make further logins easier. For more details, see https://techcommunity.microsoft.com/t5/Azure-Active-Directory/The-new-Azure-AD-sign-in-and-Keep-me-signed-in-experiences/td-p/128267

    210985-error-28.jpg210955-error-29.jpg


  3. khanh 1 Reputation point
    2022-06-14T05:30:25.043+00:00

    Hi ShwetaMathur,

    I'm sorry but I still can't get login as expected.

    I'm stuck at this step after sign in.

    211099-error-30.jpg


  4. khanh 1 Reputation point
    2022-06-14T05:52:07.92+00:00

    HI ShwetaMathur,

    Do you mean that I have to provide user flow name from my application ?
    I just have to provide APPLICATION_ID , CLIENT_SECRET and TENANT_ID in my app.

    AUTH_TYPE = AUTH_OAUTH
    OAUTH_PROVIDERS = [
    {
    'name': 'azure',
    'icon': 'fa-windows',
    'token_key': 'access_token',
    'remote_app': {
    'client_id': '84798189-3304-4712-9d7e-0d66af656be1',
    'client_secret': 'm-secret----KkQCbHpbl8',
    'api_base_url': 'https://login.microsoftonline.com/56e86d7d-7d9e-4cf6-8c0b-0721a3df4a32/oauth2',
    'client_kwargs': {
    'scope': 'User.read givenName sn email profile upn',
    'resource': '84798189-3304-4712-9d7e-0d66af656be1',
    },
    'request_token_url': None,
    'access_token_url': 'https://login.microsoftonline.com/56e86d7d-7d9e-4cf6-8c0b-0721a3df4a32/oauth2/token',
    'authorize_url': 'https://login.microsoftonline.com/56e86d7d-7d9e-4cf6-8c0b-0721a3df4a32/oauth2/authorize',
    },
    },
    ]

    while inspecting the page , I get this error :
    211088-image.png


  5. khanh 1 Reputation point
    2022-06-14T14:55:14.497+00:00

    Thank a lot for your help.

    I'll open another case

    Regards

    0 comments No comments