我使用烧瓶舞 make_azure_blueprint 将工作天蓝色身份验证层设置为烧瓶应用程序。
blueprint = make_azure_blueprint(
client_id=client_id,
client_secret=client_secret,
tenant=tenant_id,
scope=[
scopes.Email,
scopes.DirectoryReadAll,
scopes.OpenID,
scopes.Profile,
scopes.UserRead,
scopes.UserReadAll,
],
login_url=LOGIN_URL_PATH,
authorized_url=AUTH_CALLBACK_URL_PATH,
redirect_url='http://localhost:5000/',
)
app.register_blueprint(blueprint, url_prefix="/login")
范围是:范围 -
DirectoryReadAll = 'Directory.Read.All'
Email = 'email'
GroupMemberReadAll = 'GroupMember.Read.All'
Profile = 'profile'
OpenID = 'openid'
UserReadBasicAll = 'User.ReadBasic.All'
UserRead = 'User.Read'
UserReadAll = 'User.Read.All'
使用它,我能够检索用户信息并显示在应用程序上。现在我正在尝试结合 Azure 时间序列洞察范围“https://api.timeseries.azure.com//user_impersonation”。但这会返回一个错误,指出这不能与特定于资源的组混合。 在此处输入图像描述