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

connection property set_user_root_attributes 'on_each_login' doesn't reflect in tenant #587

Closed
6 tasks done
PrestonR opened this issue May 18, 2023 · 6 comments
Closed
6 tasks done
Labels
🪲 bug Something isn't working

Comments

@PrestonR
Copy link

PrestonR commented May 18, 2023

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this provider and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When I set set_user_root_attributes to on_each_login I do not see the setting toggled in the Auth0 connection.

Expectation

I would expect to see the setting toggled in the tenant.

Reproduction

  1. Given the following resource block (filling in the appropriate variables and references as necessary):
resource "auth0_connection" "azure_ad" {
  name           = substr(replace(replace(var.display_name, " ", ""), "_", "-"), 0, min(length(var.display_name), 128))
  display_name   = ""
  strategy       = "waad"
  show_as_button = true

  options {
    identity_api             = "microsoft-identity-platform-v2.0"
    client_id                = azuread_application.app.application_id
    client_secret            = azuread_application_password.app_pw.value
    tenant_domain            = var.aad_domain
    domain                   = var.aad_domain
    use_wsfed                = false
    waad_protocol            = "openid-connect"
    waad_common_endpoint     = false
    max_groups_to_retrieve   = 250
    api_enable_users         = true
    set_user_root_attributes = "on_each_login"
    non_persistent_attrs     = ["ethnicity", "gender"]

    should_trust_email_verified_connection = "always_set_emails_as_verified"

    domain_aliases = [
      "example.com",
      "example2.com",
    ]

    scopes = [
      "basic_profile",
      "ext_groups",
      "ext_profile",
    ]

    upstream_params = jsonencode({
      "screen_name" : {
        "alias" : "login_hint"
      }
    })
  }
}
  1. When I deploy the resource block, all settings should look as defined for the connection.
  2. Then I check the connection in the Auth0 portal, "Sync user profile attributes at each login" is untoggled

Auth0 Terraform Provider version

0.47.0

Terraform version

1.45

Additional notes

For what it's worth, I also tried not specifying the property so that it would set the default to on_each_login but it looks like it just sets the value to an empty string.

@sergiught
Copy link
Contributor

Hey folks, we just released https://github.com/auth0/terraform-provider-auth0/releases/tag/v0.48.0 with a fix for this. Please check it out and let us know if you encounter any issues!

@spawluk-zartis
Copy link

spawluk-zartis commented May 29, 2023

Hey @sergiught. After that fix, Microsoft AD tenant works ok, but Google Workspace tenant switches set_user_root_attributes off on UI, even if set_user_root_attributes = "on_each_login" is set

@sergiught
Copy link
Contributor

sergiught commented May 30, 2023

Hey @spawluk-zartis 👋🏻 , thanks for raising this with us. Just so I'm understanding correctly, before the fix for Microsoft AD Connections you were able to manage the set_user_root_attributes property for Google Workspace Connections and after you're not any longer?

@spawluk-zartis
Copy link

spawluk-zartis commented May 31, 2023

@sergiught yes. This is the behavior I observed after updating from 0.47.0 to 0.48.0

@sergiught
Copy link
Contributor

Alright we'll look into it 👍🏻

@sergiught
Copy link
Contributor

Hey folks, we fixed this across various other enterprise connections in https://github.com/auth0/terraform-provider-auth0/releases/tag/v0.49.0. Try it out and let us know if you encounter any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants