question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enterprise extension attributes are being treated as core attributes

See original GitHub issue

First, thank you all for your great work Second, according to the RFC, extension attributes should appear as an object with the SchemaId as the name. Currently, it appears as a core attribute. Here is my setup

var _userSchemaBuilder = SCIMSchemaBuilder.Create("urn:ietf:params:scim:schemas:core:2.0:User", "User", "Users", "User Account", true);
var _userSchema = _userSchemaBuilder.AddStringAttribute("userName", caseExact: false, required: true, uniqueness: SCIMSchemaAttributeUniqueness.SERVER)
.AddSCIMSchemaExtension("urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", false)
.Build();

var _extensionSchemaBuilder = SCIMSchemaBuilder.Create("urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", "EnterpriseUser", "Users", "Enterprise User");
var _extensionUserSchema = _extensionSchemaBuilder.AddStringAttribute("department")
.Build();

var _scimRepresentationBuilder = SCIMRepresentationBuilder.Create(new List<SCIMSchema>
{
    _userSchema,
    _extensionUserSchema
});

_scimRepresentationBuilder
.AddStringAttribute("userName", "urn:ietf:params:scim:schemas:core:2.0:User", new List<string> { "joe@xyz.com" });
.AddStringAttribute("department", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User", new List<string> { "Marketing" });

From the above configuration, I expect the result is

{
    "userName": "joe@xyz.com",
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{
        "department": "Marketing"
    },
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ]
}

But the result is

{
    "userName": "joe@xyz.com",
    "department": "Marketing",
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ]
}

Am I doing something wrong in the setup? Or is there something with the ScimRepresentationBuilder?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
simpleidservercommented, Jun 29, 2022

The release is published.

Kind regards,

SID

1reaction
simpleidservercommented, Jun 22, 2022

Hello,

The version 2.0.10 will be released next week 28.

Kind regards,

Sid

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the user.ExtensionAttribute1-15 available as a ...
Seems like a simple answer. The Microsoft documentation says this: Extension Attributes 1-15: On-premises extension attributes used to ...
Read more >
Extension attributes not working for customer address #9668
Setting an extension attribute for customer address won't assign it to object so it's not validated and saved to database correctly.
Read more >
Creating Custom Attributes in Azure Active Directory
These custom attributes can be whatever you want that might be text fields, numerical fields, binary (yes/no) fields, could be from a list...
Read more >
Can Azure AD Custom Security Attributes Replace ...
Fifteen of the Exchange custom attributes are single value (all treated as strings) while five are multi-value and can hold up to 1,300...
Read more >
How to Synchronize the EmployeeId Attribute to Azure AD?
How to extend synchronization of the EmployeeID and other attributes to Azure AD. Step-by-step guide on how to configure Azure AD Connect.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found