SSO integration using FastAPI with OAuth2 & Azure AD

Viewed 936

I have a requirement to integrate azure SSO to the WebApp. My WebApp is built in FastAPI. Currently I implemented it by referring https://pypi.org/project/fastapi_msal/. It's working and giving me logged in user information which I need. But the usecase which i need is little different from this, This link implemented as user should enter clientID & Client Secret. But in my case on button click or on page load user should directly login it should not prompt to add clientID & Secret.

How i can achieve this? I am not getting any proper document WRT FastAPI

1 Answers

For the scope that you can get are identified in the app registration api Permission and NOT "delegated permissions" client credentials flow cannot get delegated permissions flow.

Once you give an application permission, you have to click grant for tenant. If you don't it won't be able to use it. This option specifies the client secret for the confidential client app. This secret (app password) is provided by the application registration portal or provided to Azure AD during app registration with PowerShell AzureAD, PowerShell AzureRM, or Azure CLI.

Read more here for more information on client secret.

Related