Azure-Samples/ms-identity-python-on-behalf-of ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python sample app with two parts, a Django web app and a Flask API, where the Django app signs a user in with Azure AD and then calls the Flask API on their behalf.
The Flask API should accept the user token, use the on behalf of flow to get a token for the Azure Management API, and return the user’s subscriptions from that endpoint. I want the web app to show a simple sign in experience and a page that proves the end to end flow is working by displaying the API response.
Keep it set up like a real sample project, with separate app folders and clear instructions for running each one locally. Include the Azure AD configuration pieces and any helper scripts needed to register the apps and wire up the settings. If you need to check current Microsoft docs or library details, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit