[GH-ISSUE #3477] When editing a User, the username field shows an alias rather than the primary username #1573

Closed
opened 2026-03-02 13:45:19 +03:00 by kerem · 5 comments
Owner

Originally created by @incedIT on GitHub (Jan 27, 2025).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/3477

Description

Identity Management, Users, Edit a user. The email address printed in blue under the display name is correct, but the editable username field shows an alias rather than the primary username on the account. If I manually change this field to the correct value and save, it succeeds but the username reverts to the alias. This is cosmetic only, on the View User tab the User Principal Name is correct.

I have encountered this twice now, once with a user where I used CIPP to change the primary username, and now with a user where several years ago (before using CIPP) the primary username was changed in M365 Admin.

Environment data

Non-sponsored
Front: 7.1.1
Back: 7.1.0
Tried Tenant Cache Clear: false
Tried Token Cache Clear: false
Originally created by @incedIT on GitHub (Jan 27, 2025). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/3477 ### Description Identity Management, Users, Edit a user. The email address printed in blue under the display name is correct, but the editable username field shows an alias rather than the primary username on the account. If I manually change this field to the correct value and save, it succeeds but the username reverts to the alias. This is cosmetic only, on the View User tab the User Principal Name is correct. I have encountered this twice now, once with a user where I used CIPP to change the primary username, and now with a user where several years ago (before using CIPP) the primary username was changed in M365 Admin. ### Environment data ```PowerShell Non-sponsored Front: 7.1.1 Back: 7.1.0 Tried Tenant Cache Clear: false Tried Token Cache Clear: false ```
kerem 2026-03-02 13:45:19 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 27, 2025):

Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/
If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug."

Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".

<!-- gh-comment-id:2615373790 --> @github-actions[bot] commented on GitHub (Jan 27, 2025): Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/ If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug." Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".
Author
Owner

@incedIT commented on GitHub (Jan 27, 2025):

I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.

<!-- gh-comment-id:2615374686 --> @incedIT commented on GitHub (Jan 27, 2025): I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.
Author
Owner

@incedIT commented on GitHub (Jan 28, 2025):

"I confirm that I have checked the documentation thoroughly and believe this to be an actual bug."

<!-- gh-comment-id:2618804049 --> @incedIT commented on GitHub (Jan 28, 2025): "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug."
Author
Owner

@matt-novus commented on GitHub (Jan 28, 2025):

Hey IncedIT, we had this issue as well a few years ago and it turns out to be this issue here:

https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/miscellaneous/reports-show-anonymous-user-name

If that is indeed what's causing your issue, then that can be resolved by implementing the first standard listed on this page https://docs.cipp.app/user-documentation/tenant/standards/list-standards/global-standards

Enable Usernames instead of pseudo anonymised names in reports

Microsoft announced some APIs and reports no longer return names, to comply with compliance and legal requirements in specific countries. This proves an issue for a lot of MSPs because those reports are often helpful for engineers. This standard applies a setting that shows usernames in those API calls / reports.

Update-MgBetaAdminReportSetting -BodyParameter @{displayConcealedNames = $true} AnonReportDisable

<!-- gh-comment-id:2619859654 --> @matt-novus commented on GitHub (Jan 28, 2025): Hey IncedIT, we had this issue as well a few years ago and it turns out to be this issue here: https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/miscellaneous/reports-show-anonymous-user-name If that is indeed what's causing your issue, then that can be resolved by implementing the first standard listed on this page https://docs.cipp.app/user-documentation/tenant/standards/list-standards/global-standards Enable Usernames instead of pseudo anonymised names in reports Microsoft announced some APIs and reports no longer return names, to comply with compliance and legal requirements in specific countries. This proves an issue for a lot of MSPs because those reports are often helpful for engineers. This standard applies a setting that shows usernames in those API calls / reports. Update-MgBetaAdminReportSetting -BodyParameter @{displayConcealedNames = $true} AnonReportDisable
Author
Owner

@incedIT commented on GitHub (Jan 29, 2025):

Hey IncedIT, we had this issue as well a few years ago and it turns out to be this issue here:

https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/miscellaneous/reports-show-anonymous-user-name

If that is indeed what's causing your issue, then that can be resolved by implementing the first standard listed on this page https://docs.cipp.app/user-documentation/tenant/standards/list-standards/global-standards

Enable Usernames instead of pseudo anonymised names in reports

Microsoft announced some APIs and reports no longer return names, to comply with compliance and legal requirements in specific countries. This proves an issue for a lot of MSPs because those reports are often helpful for engineers. This standard applies a setting that shows usernames in those API calls / reports.

Update-MgBetaAdminReportSetting -BodyParameter @{displayConcealedNames = $true} AnonReportDisable

Thanks for the info. Unfortunately, I already have display concealed user, group and site names disabled in M365 admin, so that isn't the cause in this case.

<!-- gh-comment-id:2620943983 --> @incedIT commented on GitHub (Jan 29, 2025): > Hey IncedIT, we had this issue as well a few years ago and it turns out to be this issue here: > > https://learn.microsoft.com/en-us/microsoft-365/troubleshoot/miscellaneous/reports-show-anonymous-user-name > > If that is indeed what's causing your issue, then that can be resolved by implementing the first standard listed on this page https://docs.cipp.app/user-documentation/tenant/standards/list-standards/global-standards > > Enable Usernames instead of pseudo anonymised names in reports > > Microsoft announced some APIs and reports no longer return names, to comply with compliance and legal requirements in specific countries. This proves an issue for a lot of MSPs because those reports are often helpful for engineers. This standard applies a setting that shows usernames in those API calls / reports. > > Update-MgBetaAdminReportSetting -BodyParameter @{displayConcealedNames = $true} AnonReportDisable Thanks for the info. Unfortunately, I already have display concealed user, group and site names disabled in M365 admin, so that isn't the cause in this case.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#1573
No description provided.