- Are you running your app locally or is it deployed?
- My app is deployed as an Azure web app.
- Share the Streamlit and Python versions.
- Python 3.11
- Streamlit 1.42.0
Hello. I am trying to use Microsoft Entra to set up authentication for my streamlit app.
Here is my code:
try:
if not st.user.is_logged_in:
st.login()
except:
st.login()
st.write(f"user info dict: {dir(st.user)}")
When I navigate to the URL and port for the streamlit app, this successfully redirects me to a sign-in page. However, after I sign in, when I am redirected back to the streamlit app, I get the error saying “streamlit has no attribute ‘user’”. What is going on here? I am trying to get the user email etc. from the authentication.
Thank you for your help.