Give application access to OKTA using Python

Hello, anyone here who have sample Python scripts or idea on how I can do the ff:

  1. Validate if the User is existing in OKTA
  2. Validate if the Application Name is existing in the User Profile
  3. If application is not existing, I need to give that user an access to the application (ex. Oracle)

Hope you can help me :confused: Thank you

Hi @clnaln,
I think you’re looking for the following API calls to be able to handle what you need via Python.

  1. Validate if a user exists in Okta
    Users | Okta Developer

  2. Validate if the application name is existing in the user profile.

There are a few ways that you can do this, the first would be to use the Users API, but it depends if you’re assigning the users to the applications via groups. The second would be to use the Apps API.

  1. If the application exists give the user access
    This can be accomplished by assigning a user to a group and then the group to the application or assigning a user directly.

You should be able to use the Python SDK to make these calls as well.

Hope that helps!

3 Likes