Fix MS365 attributes handling

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-09 23:15:43 +01:00
parent 1d8ce190c3
commit dd3885ac54
9 changed files with 1280 additions and 172 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/elimity-com/scim"
scimerrors "github.com/elimity-com/scim/errors"
"github.com/elimity-com/scim/optional"
"github.com/elimity-com/scim/schema"
scimfilter "github.com/scim2/filter-parser/v2"
"go.gearno.de/kit/httpserver"
"go.gearno.de/kit/log"
@@ -71,6 +72,8 @@ func scimConfigFromContext(ctx context.Context) *coredata.SCIMConfiguration {
// NewSCIMServer creates a new SCIM server using elimity-com/scim
func NewSCIMServer(h *SCIMHandler) http.Handler {
schema.SetAllowStringValues(true)
resourceTypes := []scim.ResourceType{
{
ID: optional.NewString("User"),
@@ -78,7 +81,10 @@ func NewSCIMServer(h *SCIMHandler) http.Handler {
Endpoint: "/Users",
Description: optional.NewString("User Account"),
Schema: scimservice.UserSchema(),
Handler: &scimResourceHandler{handler: h},
SchemaExtensions: []scim.SchemaExtension{
{Schema: scimservice.EnterpriseUserSchema()},
},
Handler: &scimResourceHandler{handler: h},
},
}