World is now on Opti ID! Learn more

401 error when creating users /EPiServer/EPiServer.Cms.UI.Admin/users/Create

Vote:
 

Hello,

I'm in the process of setting up the identity providers for our v12 upgrade (big shout out to Brad McDavid for his library). I think most things are configured properly, except when I'm testing the create user, I get a 401 error.

It's using this endpoint:
/EPiServer/EPiServer.Cms.UI.Admin/users/Create

When I update a user using /EPiServer/EPiServer.Cms.UI.Admin/users/Update all is good.  Roles are added just fine.

The user I'm using has claims that allow it into the admin area, so I think my mappings are correct.  Pasted below just in case:

			"MappedRoles": {
				"Items": {
					"CmsAdmins": {
						"MappedRoles": [
							"WebAdmins",
							"Administrators"
						],
						"ShouldMatchAll": "false"
					},
					"CmsEditors": {
						"MappedRoles": [
							"Administrators",
							"WebEditors"
							
						],
						"ShouldMatchAll": "false"
					},
					"SearchEditors": {
						"MappedRoles": [
							"Administrators",
							"WebAdmins"
						],
						"ShouldMatchAll": "false"
					},
					"SearchAdmins": {
						"MappedRoles": [
							"Administrators",
							"WebAdmins"
						],
						"ShouldMatchAll": "false"
					},
					"PackagingAdmins": {
						"MappedRoles": [
							"Administrators",
							"WebAdmins"
						],
						"ShouldMatchAll": "false"
					},
					"OPCEditors": {
						"MappedRoles": [
							"OPCEditors"
						],
						"ShouldMatchAll": "false"
					},
					"ProfilesSegmentViewers": {
						"MappedRoles": [
							"Administrators",
							"WebAdmins"
						],
						"ShouldMatchAll": "false"
					},
					"ProfilesReportViewers": {
						"MappedRoles": [
							"Administrators",
							"WebAdmins",
							"WebEditors"
						],
						"ShouldMatchAll": "false"
					}

				}

 

I'm putting a breakpoint in the userProvider and it's not getting into the method.  Not sure how to debug this one as the 401 is coming from within Episerver.

 

Cheers

#339544
Jun 26, 2025 15:02
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.