Hoppa till huvudinnehållet

Error removing Active Directory users from DefaultRoleProvider when they no longer exist

Kommentarer

2 kommentarer

  • Malcolm Walker
    • Community-Manager

    Hi Marcus,

     

    The code that removes role membership is reused for each operation, which is why CreateUser() appears in this stack trace.

     

    Because the user was removed from Active Directory, we can't get their user principal, so it's null.  Unfortunately, the CreateUser() method will try to create the user in this case, and won't do anything with the roles.  

     

    You may be able to avoid the issue if you try to remove multiple users from the role at once.  Are you able to bypass the issue if you do that?

     

    Regards,

     

    -Malcolm
    0
  • Marcus Bodig
    Malcolm,

     

    Removing multiple users at once did solve the issue.  I added myself to the group and applied the changes.  I then removed myself and the non-existant user and it worked correctly.

     

    Thank you for the work around...
    0

Du måste logga in om du vill lämna en kommentar.