The /.auth/me endpoint gives you the information you need, i.e., it is a part of the access token (RS256 encoded) and maybe even decoded as well. You need to include the AppServiceAuthSession cookie in your get request to the endpoint.
This code snippet should work in streamlit:
import requests
from streamlit.server.server import Server
from streamlit.report_thread import get_report_ctx
session_id = get_report_ctx().session_id
session_info = Server.get_current()._get_session_info(session_id)
session_headers = session_info.ws.request.headers
ckks = session_headers['cookie']
ckkd = dict(item.split("=",1) for item in ckks.split("; "))
tokens = requests.get('https://<your_app>.azurewebsites.net/.auth/me',cookies=ckkd)
tokens = tokens.json()