django-saml2-auth icon indicating copy to clipboard operation
django-saml2-auth copied to clipboard

User Identity Information read

Open shakthifuture opened this issue 4 years ago • 9 comments

I have implemented Django Saml2 Auth in my application, It's working very well.

I want to get the user information from azure. While debugging I am able to see the user_identity, Now I need to get the user_identity which is available in the library here I don't know how to read the value from my application.

shakthifuture avatar Oct 05 '20 13:10 shakthifuture

hi @shakthifuture, may i know the django version you are using? i'm trying to use it on my portal using django 3.1 and no luck.

romcab avatar Oct 06 '20 04:10 romcab

hi @romcab, I am using Django version 3.0.

shakthifuture avatar Oct 06 '20 04:10 shakthifuture

hi @shakthifuture, so 3.x is supported.

if you don't mind, can you share your settings.py? or can i share with you my settings and see potential errors? thanks in advance.

romcab avatar Oct 06 '20 04:10 romcab

Here I shared my settings. https://stackoverflow.com/questions/64154706/modulenotfounderror-at-saml-auth2-acs.

shakthifuture avatar Oct 06 '20 05:10 shakthifuture

@shakthifuture thanks for sharing, got the name_id_format and attributes map correctly. A follow-up question though. 'ASSERTION_URL': 'https://127.0.0.1:8000', is this the portal or ADFS IDP endpoint? 'ENTITY_ID': 'http://samltoolkit/xxxxx-437a-430e-a63a-125f2c210e52' is this the entityID value found in metadata.xml? ?appid=xx-4dd1-4429-83d4-xxx', is this visible in metadata.xml as well?

the only info i have are the following.

  • SSO URL
  • URL:
  • ADFS IDP endpoint:
  • ADFS entity ID:

thanks!

romcab avatar Oct 06 '20 06:10 romcab

Hi @romcab , Why you are changing the topic? My actual problem still not yet resolved. Please post your question in a separate thread or channel which didn't affect others.

shakthifuture avatar Oct 06 '20 09:10 shakthifuture

@romcab, follow this URL for entity id. https://stackoverflow.com/questions/63887609/identity-url-and-reply-url-single-sign-on

shakthifuture avatar Oct 06 '20 15:10 shakthifuture

Thanks @shakthifuture.

i don't have access to our Azure Active Directory, i was just provided with the needed information. I already asked help to our support to validate my configuration. I will update here once done to share also my learnings.

Thank you for your support.

romcab avatar Oct 07 '20 01:10 romcab

hi @shakthifuture was able to make it work after working with our support team with access to the SSO server. what really helps me is the use of saml tracer which allows me to read the req/resp between my app and the adfs server. now, i would be looking at using https://hub.docker.com/r/kristophjunge/test-saml-idp/ at this container to easily test my application locally. Thanks!

romcab avatar Oct 07 '20 10:10 romcab