- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
03-27-2025 07:47 AM
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!
03-27-2025 10:00 PM
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!
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!

