Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(user): ignore special groups (BUILT_IN and APP_GROUP) in the group_memberships field #118

Conversation

rasta-rocket
Copy link
Contributor

@rasta-rocket rasta-rocket commented May 4, 2020

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).

Error: [ERROR] Error Updating Groups On User: The API returned an error: You do not have permission to perform the requested action

  on user-bfernando.tf line 3, in resource "okta_user" "test":
   3: resource "okta_user" "test" {

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.

@ghost ghost added the size/XS label May 4, 2020
@noinarisak noinarisak added the needs-investigation Needs further investigation label Oct 9, 2020
@bogdanprodan-okta
Copy link
Contributor

Hi @rasta-rocket! I will make an additional investigation on this issue and merge this PR if everything is OK. It then should appear in the new release v3.7.5 in early 2021.

…okta into group_memberhip_ignore_special_groups

� Conflicts:
�	okta/user.go
@bogdanprodan-okta bogdanprodan-okta merged commit 37de564 into okta:master Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation Needs further investigation size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants