@app.route('/azurelogin')
def azurelogin_view():
 redirect_uri = request.values.get('redirect_uri')
 session_auth_state = auth.unique_auth_state()
 session['authstate'] = session_auth_state
 session['redirecturiafterauthorized'] = redirect_uri
 auth_url = auth.create_authorization_url(session_auth_state)
 return redirect(auth_url)

@ app . route ( '/azurelogin' ) def azurelogin_view ( ) : redirect_uri = request . values . get ( 'redirect_uri' ) session_auth_state = auth . unique_auth_state ( ) session [ 'authstate' ] = session_auth_state session [ 'redirecturiafterauthorized' ] = redirect_uri auth_url = auth . create_authorization_url ( session_auth_state ) return redirect ( auth_url )
redirects to azure login page .