How can i create user with custom attributes

121 Views Asked by At

I can create user:

User user = new User();
user.accountEnabled = true;
user.displayName = "some name";
user.mailNickname = "some-nick";
user.userPrincipalName = "[email protected]";
PasswordProfile passwordProfile = new PasswordProfile();
passwordProfile.forceChangePasswordNextSignIn = false;
passwordProfile.password = "randompassword";
user.passwordProfile = passwordProfile;


User userCreated = graphClient.users()
                .buildRequest()
                .post(user);

How can I create user with cusom attributes created in Azure AD B2C: https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-custom-attr ?

0

There are 0 best solutions below