diff --git a/docs/resources/connection.md b/docs/resources/connection.md index a3febd17..8ada002c 100644 --- a/docs/resources/connection.md +++ b/docs/resources/connection.md @@ -315,13 +315,14 @@ resource "auth0_connection" "azure_ad" { strategy = "waad" show_as_button = true options { - identity_api = "azure-active-directory-v1.0" - client_id = "123456" - client_secret = "123456" - strategy_version = 2 - app_id = "app-id-123" - tenant_domain = "example.onmicrosoft.com" - domain = "example.onmicrosoft.com" + identity_api = "azure-active-directory-v1.0" + client_id = "123456" + client_secret = "123456" + strategy_version = 2 + user_id_attribute = "userName" + app_id = "app-id-123" + tenant_domain = "example.onmicrosoft.com" + domain = "example.onmicrosoft.com" domain_aliases = [ "example.com", "api.example.com" @@ -751,7 +752,7 @@ Optional: - `use_cert_auth` (Boolean) Indicates whether to use cert auth or not. - `use_kerberos` (Boolean) Indicates whether to use Kerberos or not. - `use_wsfed` (Boolean) Whether to use WS-Fed. -- `user_id_attribute` (String) Attribute in the SAML token that will be mapped to the user_id property in Auth0. +- `user_id_attribute` (String) Attribute in the token that will be mapped to the user_id property in Auth0. - `userinfo_endpoint` (String) User info endpoint. - `validation` (Block List, Max: 1) Validation of the minimum and maximum values allowed for a user to have as username. (see [below for nested schema](#nestedblock--options--validation)) - `waad_common_endpoint` (Boolean) Indicates whether to use the common endpoint rather than the default endpoint. Typically enabled if you're using this for a multi-tenant application in Azure AD. diff --git a/examples/resources/auth0_connection/resource_with_azure_ad.tf b/examples/resources/auth0_connection/resource_with_azure_ad.tf index 21d1baeb..184c7641 100644 --- a/examples/resources/auth0_connection/resource_with_azure_ad.tf +++ b/examples/resources/auth0_connection/resource_with_azure_ad.tf @@ -3,13 +3,14 @@ resource "auth0_connection" "azure_ad" { strategy = "waad" show_as_button = true options { - identity_api = "azure-active-directory-v1.0" - client_id = "123456" - client_secret = "123456" - strategy_version = 2 - app_id = "app-id-123" - tenant_domain = "example.onmicrosoft.com" - domain = "example.onmicrosoft.com" + identity_api = "azure-active-directory-v1.0" + client_id = "123456" + client_secret = "123456" + strategy_version = 2 + user_id_attribute = "userName" + app_id = "app-id-123" + tenant_domain = "example.onmicrosoft.com" + domain = "example.onmicrosoft.com" domain_aliases = [ "example.com", "api.example.com" diff --git a/go.mod b/go.mod index fee1bad4..37168d23 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22 require ( github.com/PuerkitoBio/rehttp v1.4.0 - github.com/auth0/go-auth0 v1.10.1-0.20240919142940-86c7e2f07e06 + github.com/auth0/go-auth0 v1.10.1-0.20240920131149-720c3a081e03 github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-multierror v1.1.1 diff --git a/go.sum b/go.sum index 9ad10e30..7cb98636 100644 --- a/go.sum +++ b/go.sum @@ -24,8 +24,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/auth0/go-auth0 v1.10.1-0.20240919142940-86c7e2f07e06 h1:KhdyIAvazLFhgG1xHDNY8YdWK5C8s6TU4izA3DPhfoI= -github.com/auth0/go-auth0 v1.10.1-0.20240919142940-86c7e2f07e06/go.mod h1:VyYseHsdB4s9jmfBqoxnzJTvZr0w17ZJ5kjNdA+ag9Y= +github.com/auth0/go-auth0 v1.10.1-0.20240920131149-720c3a081e03 h1:U6WVosTYUQ+fafwlT5qPX2j2JpsB2cpXUdvKqUXbyho= +github.com/auth0/go-auth0 v1.10.1-0.20240920131149-720c3a081e03/go.mod h1:VyYseHsdB4s9jmfBqoxnzJTvZr0w17ZJ5kjNdA+ag9Y= github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48= github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= diff --git a/internal/auth0/connection/expand.go b/internal/auth0/connection/expand.go index 81cd7a15..b26dbbd8 100644 --- a/internal/auth0/connection/expand.go +++ b/internal/auth0/connection/expand.go @@ -725,6 +725,7 @@ func expandConnectionOptionsAzureAD(data *schema.ResourceData, config cty.Value) NonPersistentAttrs: value.Strings(config.GetAttr("non_persistent_attrs")), TrustEmailVerified: value.String(config.GetAttr("should_trust_email_verified_connection")), StrategyVersion: value.Int(config.GetAttr("strategy_version")), + UserIDAttribute: value.String(config.GetAttr("user_id_attribute")), } options.SetUserAttributes = value.String(config.GetAttr("set_user_root_attributes")) diff --git a/internal/auth0/connection/flatten.go b/internal/auth0/connection/flatten.go index 9d5e61d9..4d97e315 100644 --- a/internal/auth0/connection/flatten.go +++ b/internal/auth0/connection/flatten.go @@ -859,6 +859,7 @@ func flattenConnectionOptionsAzureAD( "should_trust_email_verified_connection": options.GetTrustEmailVerified(), "set_user_root_attributes": options.GetSetUserAttributes(), "strategy_version": options.GetStrategyVersion(), + "user_id_attribute": options.GetUserIDAttribute(), "upstream_params": upstreamParams, } diff --git a/internal/auth0/connection/resource_test.go b/internal/auth0/connection/resource_test.go index b4caeeae..0c272f86 100644 --- a/internal/auth0/connection/resource_test.go +++ b/internal/auth0/connection/resource_test.go @@ -592,6 +592,7 @@ func TestAccConnectionAzureAD(t *testing.T) { resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.client_id", "123456"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.client_secret", "123456"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.strategy_version", "2"), + resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.user_id_attribute", "userName"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.tenant_domain", "example.onmicrosoft.com"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.domain", "example.onmicrosoft.com"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.domain_aliases.#", "2"), @@ -615,6 +616,7 @@ func TestAccConnectionAzureAD(t *testing.T) { resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.identity_api", "azure-active-directory-v1.0"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.client_id", "123456"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.client_secret", "123456"), + resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.user_id_attribute", "email"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.tenant_domain", "example.onmicrosoft.com"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.domain", "example.onmicrosoft.com"), resource.TestCheckResourceAttr("auth0_connection.azure_ad", "options.0.domain_aliases.#", "2"), @@ -652,6 +654,7 @@ resource "auth0_connection" "azure_ad" { use_wsfed = false waad_protocol = "openid-connect" waad_common_endpoint = false + user_id_attribute = "userName" api_enable_users = true scopes = [ "basic_profile", @@ -687,6 +690,7 @@ resource "auth0_connection" "azure_ad" { use_wsfed = false waad_protocol = "openid-connect" waad_common_endpoint = false + user_id_attribute = "email" api_enable_users = true scopes = [ "basic_profile", diff --git a/internal/auth0/connection/schema.go b/internal/auth0/connection/schema.go index 31230eec..debfc872 100644 --- a/internal/auth0/connection/schema.go +++ b/internal/auth0/connection/schema.go @@ -689,7 +689,7 @@ var optionsSchema = &schema.Schema{ "user_id_attribute": { Type: schema.TypeString, Optional: true, - Description: "Attribute in the SAML token that will be mapped to the user_id property in Auth0.", + Description: "Attribute in the token that will be mapped to the user_id property in Auth0.", }, "idp_initiated": { Type: schema.TypeList, diff --git a/test/data/recordings/TestAccConnectionAzureAD.yaml b/test/data/recordings/TestAccConnectionAzureAD.yaml index 1d628416..25769876 100644 --- a/test/data/recordings/TestAccConnectionAzureAD.yaml +++ b/test/data/recordings/TestAccConnectionAzureAD.yaml @@ -6,14 +6,14 @@ interactions: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 641 + content_length: 672 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","strategy":"waad","show_as_button":true,"options":{"client_id":"123456","client_secret":"123456","strategy_version":2,"tenant_domain":"example.onmicrosoft.com","domain":"example.onmicrosoft.com","domain_aliases":["api.example.com","example.com"],"identity_api":"azure-active-directory-v1.0","waad_protocol":"openid-connect","use_wsfed":false,"useCommonEndpoint":false,"api_enable_users":true,"basic_profile":true,"ext_profile":true,"ext_groups":true,"should_trust_email_verified_connection":"never_set_emails_as_verified","upstream_params":{"screen_name":{"alias":"login_hint"}}}} + {"name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","strategy":"waad","show_as_button":true,"options":{"client_id":"123456","client_secret":"123456","strategy_version":2,"tenant_domain":"example.onmicrosoft.com","domain":"example.onmicrosoft.com","domain_aliases":["api.example.com","example.com"],"identity_api":"azure-active-directory-v1.0","waad_protocol":"openid-connect","use_wsfed":false,"useCommonEndpoint":false,"api_enable_users":true,"basic_profile":true,"ext_profile":true,"ext_groups":true,"should_trust_email_verified_connection":"never_set_emails_as_verified","upstream_params":{"screen_name":{"alias":"login_hint"}},"user_id_attribute":"userName"}} form: {} headers: Content-Type: @@ -30,13 +30,13 @@ interactions: trailer: {} content_length: -1 uncompressed: false - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"client_id":"123456","client_secret":"123456","strategy_version":2,"tenant_domain":"example.onmicrosoft.com","domain":"example.onmicrosoft.com","domain_aliases":["api.example.com","example.com"],"identity_api":"azure-active-directory-v1.0","waad_protocol":"openid-connect","use_wsfed":false,"useCommonEndpoint":false,"api_enable_users":true,"basic_profile":true,"ext_profile":true,"ext_groups":true,"should_trust_email_verified_connection":"never_set_emails_as_verified","upstream_params":{"screen_name":{"alias":"login_hint"}},"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","waad_common_endpoint":false,"userid_attribute":"oid"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"client_id":"123456","client_secret":"123456","strategy_version":2,"tenant_domain":"example.onmicrosoft.com","domain":"example.onmicrosoft.com","domain_aliases":["api.example.com","example.com"],"identity_api":"azure-active-directory-v1.0","waad_protocol":"openid-connect","use_wsfed":false,"useCommonEndpoint":false,"api_enable_users":true,"basic_profile":true,"ext_profile":true,"ext_groups":true,"should_trust_email_verified_connection":"never_set_emails_as_verified","upstream_params":{"screen_name":{"alias":"login_hint"}},"user_id_attribute":"userName","thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","waad_common_endpoint":false,"userid_attribute":"oid"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 201 Created code: 201 - duration: 388.469792ms + duration: 435.464042ms - id: 1 request: proto: HTTP/1.1 @@ -55,7 +55,7 @@ interactions: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: GET response: proto: HTTP/2.0 @@ -65,13 +65,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"user_id_attribute":"userName","waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 200.323625ms + duration: 158.795292ms - id: 2 request: proto: HTTP/1.1 @@ -90,7 +90,7 @@ interactions: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: GET response: proto: HTTP/2.0 @@ -100,13 +100,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"user_id_attribute":"userName","waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 184.929625ms + duration: 155.665125ms - id: 3 request: proto: HTTP/1.1 @@ -125,7 +125,7 @@ interactions: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: GET response: proto: HTTP/2.0 @@ -135,13 +135,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"user_id_attribute":"userName","waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 217.119375ms + duration: 212.03275ms - id: 4 request: proto: HTTP/1.1 @@ -160,7 +160,7 @@ interactions: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: GET response: proto: HTTP/2.0 @@ -170,33 +170,33 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"strategy_version":2,"userid_attribute":"oid","useCommonEndpoint":false,"user_id_attribute":"userName","waad_common_endpoint":false,"should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 193.132667ms + duration: 158.75525ms - id: 5 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 856 + content_length: 841 transfer_encoding: [] trailer: {} host: terraform-provider-auth0-dev.eu.auth0.com remote_addr: "" request_uri: "" body: | - {"show_as_button":true,"options":{"client_id":"123456","client_secret":"123456","tenant_domain":"example.onmicrosoft.com","domain":"example.onmicrosoft.com","domain_aliases":["api.example.com","example.com"],"identity_api":"azure-active-directory-v1.0","waad_protocol":"openid-connect","use_wsfed":false,"useCommonEndpoint":false,"api_enable_users":true,"basic_profile":true,"ext_profile":true,"ext_groups":true,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified","upstream_params":{"screen_name":{"alias":"login_hint"}},"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"]}} + {"show_as_button":true,"options":{"client_id":"123456","client_secret":"123456","tenant_domain":"example.onmicrosoft.com","domain":"example.onmicrosoft.com","domain_aliases":["api.example.com","example.com"],"identity_api":"azure-active-directory-v1.0","waad_protocol":"openid-connect","use_wsfed":false,"useCommonEndpoint":false,"api_enable_users":true,"basic_profile":true,"ext_profile":true,"ext_groups":true,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified","upstream_params":{"screen_name":{"alias":"login_hint"}},"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"user_id_attribute":"email"}} form: {} headers: Content-Type: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: PATCH response: proto: HTTP/2.0 @@ -206,13 +206,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"userid_attribute":null,"useCommonEndpoint":false,"waad_common_endpoint":false,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"userid_attribute":null,"useCommonEndpoint":false,"user_id_attribute":"email","waad_common_endpoint":false,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 364.643833ms + duration: 425.207125ms - id: 6 request: proto: HTTP/1.1 @@ -231,7 +231,7 @@ interactions: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: GET response: proto: HTTP/2.0 @@ -241,13 +241,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"userid_attribute":null,"useCommonEndpoint":false,"waad_common_endpoint":false,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"userid_attribute":null,"useCommonEndpoint":false,"user_id_attribute":"email","waad_common_endpoint":false,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 176.896542ms + duration: 150.204833ms - id: 7 request: proto: HTTP/1.1 @@ -266,7 +266,7 @@ interactions: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: GET response: proto: HTTP/2.0 @@ -276,13 +276,13 @@ interactions: trailer: {} content_length: -1 uncompressed: true - body: '{"id":"con_UqghLdzVUhenLt7a","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["4a3138b6fcc0c00a28e86077dbe83540076021c9","1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","2743ae2dd284d5280f768e2f77eb145f1bb6751b","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"userid_attribute":null,"useCommonEndpoint":false,"waad_common_endpoint":false,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/B121PNH5","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' + body: '{"id":"con_vC97x6M6uJ5I5k0D","options":{"domain":"example.onmicrosoft.com","client_id":"123456","use_wsfed":false,"app_domain":"terraform-provider-auth0-dev.eu.auth0.com","ext_groups":true,"ext_profile":true,"thumbprints":["1fd9e3e40392b30329860d52171ee3695fa507dc","8a48f046b8d93d1e7c6bfc10c54ce9cc6b94378b","31cee5dc8cfdde0eeec2035e1269b0fd66063e4a","824f47a0658299810b52ad51110d0290783e46c6"],"identity_api":"azure-active-directory-v1.0","basic_profile":true,"client_secret":"123456","tenant_domain":"example.onmicrosoft.com","waad_protocol":"openid-connect","domain_aliases":["api.example.com","example.com"],"upstream_params":{"screen_name":{"alias":"login_hint"}},"api_enable_users":true,"userid_attribute":null,"useCommonEndpoint":false,"user_id_attribute":"email","waad_common_endpoint":false,"set_user_root_attributes":"on_first_login","should_trust_email_verified_connection":"never_set_emails_as_verified"},"strategy":"waad","name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","provisioning_ticket_url":"https://terraform-provider-auth0-dev.eu.auth0.com/terraform-provider-auth0-dev/p/waad/rJNVoCqy","is_domain_connection":false,"show_as_button":true,"display_name":"Acceptance-Test-Azure-AD-TestAccConnectionAzureAD","enabled_clients":[],"realms":["Acceptance-Test-Azure-AD-TestAccConnectionAzureAD"]}' headers: Content-Type: - application/json; charset=utf-8 status: 200 OK code: 200 - duration: 205.429958ms + duration: 148.59025ms - id: 8 request: proto: HTTP/1.1 @@ -301,7 +301,7 @@ interactions: - application/json User-Agent: - Go-Auth0/1.10.0 - url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_UqghLdzVUhenLt7a + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/connections/con_vC97x6M6uJ5I5k0D method: DELETE response: proto: HTTP/2.0 @@ -311,10 +311,10 @@ interactions: trailer: {} content_length: 41 uncompressed: false - body: '{"deleted_at":"2024-09-13T14:49:36.430Z"}' + body: '{"deleted_at":"2024-09-19T17:48:55.628Z"}' headers: Content-Type: - application/json; charset=utf-8 status: 202 Accepted code: 202 - duration: 197.561167ms + duration: 163.399875ms