Closed Draag closed 7 years ago
Hi Draag,
use the oktaGetGroupsbyUserId function to get groups.
the oktaGetAppsbyUserId is looking at applications assigned to the user.
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.
$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).