I am using the standard code to add a user to AAD via #C. I noticed I can fill in most fields.
How do I select for Organizational Role and add text for Alternative Email Address?
try { AuthenticationResult authenticationResult = authenticationContext.AcquireToken(resource, clientCred); accessToken = authenticationResult.AccessToken; graphConnection = new GraphConnection(accessToken, ClientRequestId, graphSettings); try { user = new Microsoft.Azure.ActiveDirectory.GraphClient.User(); userPrincipalName = "John.Doe@aaa.onmicrosoft.com"; user.GivenName = "John"; user.Surname = "Doe"; user.DisplayName = "John Doe"; user.UserPrincipalName = userPrincipalName; user.AccountEnabled = true; user.MailNickname = userPrincipalName.Split("@".ToCharArray())[0]; user.PasswordProfile = new PasswordProfile(); user.PasswordProfile.Password = "P@ssw0rd!"; user.PasswordProfile.ForceChangePasswordNextLogin = false; user.UsageLocation = "US"; User NUser = graphConnection.Add<User>(user);
Mark Perry