Skip to content

Incorrect value get stored in surname field #11302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
amrita-shrestha opened this issue May 9, 2025 · 0 comments
Open

Incorrect value get stored in surname field #11302

amrita-shrestha opened this issue May 9, 2025 · 0 comments
Labels

Comments

@amrita-shrestha
Copy link
Contributor

Describe the bug

When creating a user, the surname field is incorrectly populated with the value of onPremisesSamAccountName (i.e., the username) instead of extracting the actual last name from the displayName.

Steps to reproduce

  1. create user
curl -vk -X POST -u admin:admin https://localhost:9200/graph/v1.0/users \
-H "Content-Type: application/json" \
-d '{
  "onPremisesSamAccountName": "hope",
  "displayName": "romi shrestha",
  "mail": "[email protected]",
  "passwordProfile": {
    "password": "1234"
  }
}'
  1. Then we get a response
{
    "displayName": "romi shrestha",
    "id": "eeeca5f4-50bd-4863-8d4b-0b53234bae46",
    "mail": "[email protected]",
    "onPremisesSamAccountName": "hope",
    "surname": "hope",
    "userType": "Member"
}

Expected behavior

surname should be "shrestha" — the last name parsed from displayName.

Actual behavior

surname is "hope" — incorrectly using the value of onPremisesSamAccountName.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

OCIS_version=7.1.2+12415ad52
Web client version=11.3.1

Additional context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant