Unable to add custom schemas at startup
See original GitHub issueI’ve tried using the suggested SCIMSchemaBuilder helper and .AddSchemas() in order to add a custom schema at startup, but I’m still getting a
schemas are unknown
scim error response when I try to use the schema I defined. Any idea what I might be doing wrong?
My code:
`List<SCIMSchema> customSchemas = new List<SCIMSchema>(); var dog = SimpleIdServer.Scim.Builder.SCIMSchemaBuilder.Create(“urn:dog”) .AddStringAttribute(“name”) .AddStringAttribute(“breed”) .Build(); customSchemas.Add(dog);
services.AddSIDScim(_ =>
{
_.IgnoreUnsupportedCanonicalValues = false;
}).AddSchemas(customSchemas);
var schemas = new List<SCIMSchema>
{
userSchema,
groupSchema
};
services.AddScimStoreMongoDB(opt =>
{
opt.ConnectionString = "mongodb://localhost:27017";
opt.Database = databaseName;
opt.CollectionMappings = "mappings";
opt.CollectionRepresentations = "representations";
opt.CollectionSchemas = "schemas";
}, schemas,
new List<SCIMAttributeMapping>
{
new SCIMAttributeMapping
{
Id = Guid.NewGuid().ToString(),
SourceResourceType = SCIMConstants.StandardSchemas.UserSchema.ResourceType,
SourceAttributeSelector = "groups",
TargetResourceType = SCIMConstants.StandardSchemas.GroupSchema.ResourceType,
TargetAttributeId = groupSchema.Attributes.First(a => a.Name == "members").SubAttributes.First(a => a.Name == "value").Id
}
});`
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
c# - app.config configSections custom settings can not find ...
1 Answer 1 ... Try linking the app.config file to the corresponding schema (ussually you can find it on C:\Program Files\Microsoft Visual Studio...
Read more >BUG]: Custom Connector, GetIdentities unable to resolve ...
Describe the issue The GetIdenties action on Azure DevOps custom connector is showing error "Unable to resolve schema" in Definitions tab.
Read more >Deploy to custom schemas & override dbt defaults - YouTube
0:44 - Explain demo scenario 1:55 - Add config to project 2:30 ... How to Deploy To A Custom Schema | dbt labs...
Read more >ERROR: no schema has been selected to create in
I had pgdump file with creating functions in custom schema and I ... But only the owner of the database will be able...
Read more >Bug: Unable to open Revit 2019 model after saving custom ...
For my addin I want to save data into the project information of the document using a custom schema. This is generated using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks, I appreciate the help. I have just one last question: With my currect configuration when I try to POST an enterprise user, I’m getting a schema unknown error. Is there something I need to do to enable the enterprise:2.0:User extension?
The sample project “src\Scim\SimpleIdServer.Scim.Startup” has been updated and the schema “urn:ietf:params:scim:schemas:extension:enterprise:2.0:User” is defined as an extension schema : https://github.com/simpleidserver/SimpleIdServer/tree/master/src/Scim/SimpleIdServer.Scim.Startup
Now the “User” resource has 2 schemas “urn:ietf:params:scim:schemas:core:2.0:User” and “urn:ietf:params:scim:schemas:extension:enterprise:2.0:User”. Can you execute the sample project “src\Scim\SimpleIdServer.Scim.Startup” and post the following HTTP POST request to create a user ?
You should receive a response like this: