Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

why can a user in a ad with organizational role "User" change the password of other users

$
0
0

Hello,

I wrote myself a little user management tool using the GraphApi (Microsoft.Azure.ActiveDirectory.GraphClient). If I let the tool sign in with a user that only has the role user assigned:

it cannot create or delete users, but assign new passwords to other users with the following code:

            List<IUser> users = await getUsers().ConfigureAwait(false);
            IUser userToModify = users.Find(user => user.UserPrincipalName == CurrentUser.UserPrincipalName);

            userToModify.PasswordProfile = new PasswordProfile
            {
                Password = password,
                ForceChangePasswordNextLogin = false,
            };
            userToModify.PasswordPolicies = "DisablePasswordExpiration, DisableStrongPassword";

            await userToModify.UpdateAsync().ConfigureAwait(false);

Any idea how that can be?





Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>