World is now on Opti ID! Learn more
AI OnAI Off
World is now on Opti ID! Learn more
The Users API is asking your UserProvider implementation whether Create and Update is supported in each endpoint. If not supported you will get that 401 error, regardless of the admin user's roles or claims.
Which provider are you using?
Stefan, thanks for the response.
I'm using a custom UIUserProvider and have implemented overrides for
public override async Task<CreateUserResult> CreateUserAsync(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved)
and even the obsolete:
public override IUIUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, out UIUserCreateStatus status, out IEnumerable<string> errors)
I have breakpoints in these methods and they're not being called.
Do you know if there is another way that I need to show that this is enabled?
Cheers
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:
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