Working Python example of SAML Logon API with Azure AD

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Working Python example of SAML Logon API with Azure AD

L0 Member

Hello all,

I have been scouring the internet looking for a working Python example of how to hit the SAML Logon API ( SAML logon | CyberArk Docs ) when our CyberArk instance is hosted in Azure AD. The part I'm having trouble with is getting the SAML Response from Azure AD. I'm trying to make what I think is the right API call, but I'm met with an "Admin approval needed" message from Azure AD so I'm wondering if we need to add more access to our CyberArk app in Azure AD. However, I thought I would ask here in case anyone has a working Python example of doing this, and I can try it on my side and see if I get the same "admin approval needed" message. Thank you!

1 REPLY 1

L7 Applicator

Hi @Kent Yeabower​ 

 

Yes this error message ""Admin approval needed" from Azure AD suggests that Azure AD application does not have sufficient permissions.

 

When you are trying from Python, you cannot directly get the SAML Response from Azure AD via API unless your Azure AD app is configured for programmatic authentication.

 

The SAML response is usually returned via a browser based login flow.

 

Please try using OAuth 2.0 instead of using SAML which will give you an access token.

 

Hope it helps!

 

 

  • 200 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!