0

So we have a website wherein one of its functionalities is you can create a user in an AD. Now, we have multiple domains that are enforcing password complexity. I am very sure that this code proceeds to the exception whenever that complexity was not met:

newUser.Invoke("SetPassword", new object[] { password });

The problem is, one of our domains throws this message in the browser to the user:

The password does not meet the password policy requirements. Check the minimum password lengths, password complexity and password history requirements

But when using other domain, it displays another message:

Server is unwilling to process the request.

I would like to ask, what are the factors why are error messages varying in the domains?

bampie
  • 1
  • 1
  • Possible duplicate of [Server is unwilling to process the request - Active Directory - Add User via C#](https://stackoverflow.com/questions/13748970/server-is-unwilling-to-process-the-request-active-directory-add-user-via-c-s) – mjwills Jul 26 '17 at 07:46
  • The first error message is somewhat self explanatory. For the second, https://stackoverflow.com/questions/13748970/server-is-unwilling-to-process-the-request-active-directory-add-user-via-c-s may be helpful. – mjwills Jul 26 '17 at 07:46
  • Gee, thanks for that! – bampie Jul 27 '17 at 01:59
  • Did those links help @bampie ? – mjwills Jul 27 '17 at 02:23
  • No, as far as I can see, those cases are very different to what I am asking above. – bampie Jul 27 '17 at 09:08
  • In what way are they very different? If you pass in a password that **meets** the complexity requirements, how does it behave against both domains? – mjwills Jul 27 '17 at 09:26
  • It accepts the user's account. The concern here is the message, why do they vary? Because in Domain A, the first message is being returned but in Domain B, we're getting the second one. Does it have something to do with the OS of those domains? I don't have any clue as to why they are throwing these two different exceptions. – bampie Jul 27 '17 at 12:24

0 Answers0