mbegan / Okta-PSModule

Okta API Powershell Wrapper Module
Other
102 stars 31 forks source link

oktaGetAppsbyUserId no returns in one environment #15

Closed Draag closed 7 years ago

Draag commented 7 years ago

$UserAPPs= oktaGetAppsbyUserId -oOrg Preview -uid $UserID returns the single group that the user is a member of.

$UserAPPs= oktaGetAppsbyUserId -oOrg Prod -uid $UserID returns zero groups.

User ID's in both environments are valid. I am able to retrieve the $user.id from both before using it with the -uid param of oktaGetAppsbyUserId ( with the correct -oOrg specified of course).

mbegan commented 7 years ago

Hi Draag,

use the oktaGetGroupsbyUserId function to get groups.

the oktaGetAppsbyUserId is looking at applications assigned to the user.

Draag commented 7 years ago

Turned out to be the API level. Needed higher than Org level admin rights to query a user's apps (and yes, I did wrongly type groups instead of apps).

Thanks for the response tho.