-
Notifications
You must be signed in to change notification settings - Fork 211
Description
Describe the bug
I want to update User's Job Title. They contains single quote because they are in french, but they are replaced with "u0027" and I can't escape it
Expected behavior
Single quote are not replaced with u0027
How to reproduce
Update-MgUser -UserId [email protected] -JobTitle "Direction de l'amélioration"
will create the following JobTitle "Direction de lu0027amélioration". It was working properly in a previous version, but I can't tell which one.
SDK Version
2.26.0
Latest version known to work for scenario above?
2.24.0
Known Workarounds
The only workaround I found was to go to entra.microsoft.com and use the GUI.
Debug output
DEBUG: [CmdletBeginProcessing]: - Update-MgUser begin processing with parameterSet 'UpdateExpanded'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [AuditLog.Read.All, Directory.AccessAsUser.All, Directory.Read.All, Group.Read.All, GroupMember.Read.All, openid, profile, User.Read, User.ReadBasic.All, User.ReadWrite.All, email].
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
PATCH
Absolute Uri:
https://graph.microsoft.com/v1.0/users/user1%40contoso.com
Headers:
FeatureFlag : 00000003
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.17763; en-US),PowerShell/7.4.7
SdkVersion : graph-powershell/2.26.0
client-request-id : 226a266d-4975-459a-a2cf-12c67f37a84c
Accept-Encoding : gzip,deflate,br
Body:
{
"jobTitle": "Direction de lu0027amélioration"
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
NoContent
Headers:
Cache-Control : no-cache
Strict-Transport-Security : max-age=31536000
request-id : 7f1a2976-175d-4a9c-96ec-4b4b4b1f0cb8
client-request-id : 226a266d-4975-459a-a2cf-12c67f37a84c
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Canada East","Slice":"E","Ring":"3","ScaleUnit":"001","RoleInstance":"QB1PEPF000057A2"}}
x-ms-resource-unit : 1
Date : Mon, 14 Apr 2025 17:51:18 GMT
Body:
DEBUG: [CmdletEndProcessing]: - Update-MgUser end processing.
Configuration
win10
powershell V7.4.7
Other information
"/" are simply removed. "`/" does not work. "/" don't work either
-EDIT
I added the latest known version that worked. 2.24.0 as uninstalled 2.26. This also fixed the "/" problem