azureflaskaccess-tokensamlmicrosoft-entra-id

Microsoft Azure: How to get the Auth Token after SAML authentication on a enterprise application


I created a enterprise application and add a SAML as a Single Sign-On option.

When i click the button to Test the app, the authentication works, but i cannot get the Token.

My response URL (flask endpoint):

@app.route('/response',methods=['POST','GET'])
def response():
    data = {}
    if request.is_json:
        data['json'] = request.get_json()
    if request.form:
        data['form'] = request.form.to_dict()
    if request.args:
        data['args'] = request.args.to_dict()
    if request.data:
        data['data'] = request.data.decode('utf-8')
    return jsonify(data), 200

The code shows on screen all parameters received.

The Token supposed to be posted on /response, but the result is an empty curly brackets {}


Solution

  • Just do not use pinggy.io to test SSO authentication, use pythonanywhere or any other deploy tool