mattmcnabb / OneLogin

A PowerShell module for automating components of a OneLogin account
7 stars 3 forks source link

Get-OneloginUserRole Doesn't Return Live Roles #32

Closed mattmcnabb closed 7 years ago

mattmcnabb commented 7 years ago

Roles are retrieved based on the user object piped in - if the user object is saved in a variable then any new roles since the user was retrieved will not be included.

Repro:

The new role is not returned. This is because the roles are retrieved based on the role ids included in the user object which has been saved statically in the $user variable. Get-OneLoginUserRole should re-retrieve these role ids before returning the role objects.

mattmcnabb commented 7 years ago

closed with commit 31bcefbd01ce752b15e1e729ddedf6df471e46b7