Closed ar3s3ru closed 6 months ago
Hi, you can use existing resources to achieve this:
data "authentik_scope_mapping" "scope-email" {
managed = "goauthentik.io/providers/oauth2/scope-email"
}
resource "authentik_scope_mapping" "scope-user-pk" {
name = "OAuth mapping: OpenID 'user_pk'"
scope_name = "user_pk"
description = "User ID"
expression = <<EOF
return {
"id": request.user.pk,
}
EOF
}
It appears there is no resource nor data source that we could use to provide or access an OAuth Scope Mapping.
It would be nice to have one.
Perhaps
authentik_property_mapping_oauth
orauthentik_property_mapping_oauth_scope
to keep it consistent with the existing naming?