Skip to content

Bug in Update-MgUser: Lowercase "rn" in String Causes Truncated Output in Entra #3183

Closed
@benpaddick1

Description

@benpaddick1

Describe the bug

When using the Update-MgUser cmdlet from the latest module update, there appears to be an issue where any user field containing the lowercase string "rn" is truncated at that point when updated in Entra. If the same string is provided in uppercase ("RN"), the issue does not occur.

Expected behavior

Expected Behaviour:

The FaxNumber field should display the complete string:

"Test string with rn in it"

Actual Behaviour:

The FaxNumber field shows the truncated string:

"Test string with in it"

How to reproduce

Steps to Reproduce:

Update-MgUser -UserId $User.Id -FaxNumber "Test string with rn in it"

Check the updated FaxNumber field in Entra.

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

Workaround:

Changing "rn" to uppercase ("RN") prevents the truncation:

Update-MgUser -UserId $User.Id -FaxNumber "Test string with RN in it"

Impact

This issue could affect user updates where "rn" appears naturally in strings, potentially leading to data loss or corruption in user attributes.

Can anyone else reproduce the error.

Debug output

Click to expand log ```
</details>


### Configuration

Windows 10 Build 19405
Module: 2.26.0

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions