Working with another coder on GitHub, the solution was found (https://github.com/Azure-Samples/ms-identity-python-webapp/issues/51)
The app must make use of a custom proxy fix as follows, and remove the one from Werkzeug.
class CustomProxyFix(object):
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
environ['HTTP_HOST'] = 'example.org'
environ['wsgi.url_scheme'] = 'https'
return self.app(environ, start_response)
app.wsgi_app = CustomProxyFix(app.wsgi_app)
This issue can now be considered solved.