fix(user): ignore special groups (BUILT_IN and APP_GROUP) in the group_memberships field #118
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently it is not possible to manipulate the group memberships of a user if it is belonging to special groups such as "APP_GROUP" (group.type).
According to the debugging that I did, this appears when the provider tries to remove the set of groups assigned to the user:
https://github.com/terraform-providers/terraform-provider-okta/blob/master/okta/user.go#L470
However assignments related to special groups (BUILT_IN and APP_GROUPS) cannot be manipulated through the Okta API (even as SUPER_ADMIN)
Note: documentation about group types
Today this situation is a kind of already managed by skipping the built-in group called Everyone:
https://github.com/terraform-providers/terraform-provider-okta/blob/master/okta/user.go#L469
This skip phase should be generalized to groups such as BUILT_IN and APP_GROUP group types.