Application Access Check

Hello, any idea how to check an application in okta user using powershell?

For ex. The user requested for Office 365 then the powershell script will connect to OKTA and check if the application requested is already on the user, if not, it will send an email notification.

Please refer to the following API documentation to retrieve a specific user assigned to an application. You can make the request with PowerShell using the Invoke-RestMethod cmdlet.

2 Likes

I have an unofficial PowerShell module that does a lot of the work for you: GitHub - gabrielsroka/OktaAPI.psm1: Call Okta API from PowerShell -- unofficial code.

1 Like

Hello, I also have a question on this scenario:

I have a user assigned in a specific organizational unit in OKTA.
I need to give that user the access to some of applications in OKTA.

Do you have any idea on how I can start with my script? Or sample script on how I can give application access to a specific user using powershell? I am new into this and I am lost where I should start. Hope you can help :confused:

assigned in a specific organizational unit in OKTA

Did you mean group?

Did you check my repo? The api docs?

Yes, the user is assigned in a specific group. I saw your script in Github in assigning user to app. Is that the same as giving user an access to application?

@{
id = “00ud4tVDDXYVKPXKVLCO”
scope = “USER”
credentials = @{
userName = “user@example.com
password = @{
value = “correcthorsebatterystaple”
}
}
}

This? In my case, the user needs to have access on the applications in OKTA.

Another thing that I need to do is:

Script wherein I need to check if a specific application is already existing in the user profile in OKTA. If not I have to send an email notif to the user. Is this try catch?

please take the time to:

  1. get familiar with the Okta API: Apps | Okta Developer etc
  2. read the readme in my repo: GitHub - gabrielsroka/OktaAPI.psm1: Call Okta API from PowerShell -- unofficial code.
  3. look at some of the examples in the repo

here is one example:

1 Like

This is example of giving application access to a user in OKTA? How about checking if the application is already existing in ther user profile? Do you have a sample for that? :confused:

Thank you so much Gabriel! Your github samples really help me somehow understand how okta and powershell works. This is my 1st time to try okta and powershell. You really helped me a lot!

1 Like

Check the filter: Apps | Okta Developer