我创建了python flask api,我需要使用azure活动目录进行身份验证。我有client secret
,client id
和tenant
。我正在关注微软的example。但它会引发错误:
Sign in
Sorry, but we’re having trouble signing you in.
AADSTS65005: Misconfigured application. This could be due to one of the
following: The client has not listed any permissions for 'Microsoft Graph' in
the requested permissions in the client's application registration. Or, The
admin has not consented in the tenant. Or, Check the application identifier in
the request to ensure it matches the configured client application identifier.
Please contact your admin to fix the configuration or consent on behalf of the
tenant. Client app ID: 561b7942-251c-4f36-8f80-4409947bf61f
任何人都可以建议我使用azure活动目录验证基于python烧瓶的应用程序的良好工作示例/教程。
谢谢
错误代码指向缺少权限。
您关注的示例看起来不错。如果您正确执行此步骤,请检查
- 配置应用程序的权限。在“设置”菜单中,选择“所需权限”部分,然后单击“添加”,再单击“选择API”,然后在文本框中键入Microsoft Graph。然后,单击“选择权限”并在“委派权限”下选择“登录”并阅读用户配置文件。
我正在提供截图以使其更明确。请一直关注到最后。特别是击中“授予权限”的最后一步。我已经看到它多次错过并导致像你这样的错误,因为缺少同意。