Skip to content

New-MgUserContactFolderContact doesn't insert the Initials #3140

@ChrisRe-Lal

Description

@ChrisRe-Lal

Describe the bug

Hello,

I'm creating contact using New-MgUserContactFolderContact and want to fill th Initials parameters.

I don't get any error but the initials value is not available in outlook.
When checking from outlook (All fields -> All contacts field), the initials field is empty

But when I use Get-MgUserContactFolderContact -UserId [UserID] -ContactFolderId [ContactFolderID] I can see the initials are there.

Chris

Expected behavior

I expect to be able to see the initials in outlook and subsequently in the contacts on Iphone's

How to reproduce

New-MgUserContactFolderContact -UserId [UserID] -ContactFolderId [ContactFolderID] -FileAs "Doe" -DisplayName "John Doe" -Initials "JDO"

Open the contact in outlook -> contact Tab -> All Fields ->Select All Contacts Fields in the dropdown

SDK Version

2.25.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

DEBUG: [CmdletBeginProcessing]: - New-MgUserContactFolderContact begin processing with parameterSet 'CreateExpanded'.
DEBUG: [Authentication]: - AuthType: 'AppOnly', TokenCredentialType: 'ClientSecret', ContextScope: 'Process', AppName: 'GAL Export'.
DEBUG: [Authentication]: - Scopes: [Device.Read.All, MailboxSettings.Read, Contacts.ReadWrite, User.Read.All].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://graph.microsoft.com/v1.0/users/[UserID]/contactFolders/[ContactFolderID]/contacts

Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.20348; en-GB),PowerShell/5.1.20348.2849
Accept-Encoding : gzip
SdkVersion : graph-powershell/2.25.0
client-request-id : b43cc171-b5e7-49c1-9a1b-5ca412299470

Body:
{
"displayName": "John Doe",
"fileAs": "Doe",
"initials": "JDO"
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Created

Headers:
Transfer-Encoding : chunked
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 97207985-c32e-486d-9db8-32ec3db3b50a
client-request-id : b43cc171-b5e7-49c1-9a1b-5ca412299470
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"[Region]","Slice":"E","Ring":"3","ScaleUnit":"001","RoleInstance":"[RoleInstance]"}}
Cache-Control : private
Date : Tue, 18 Feb 2025 14:42:49 GMT
Location : https://graph.microsoft.com/v1.0/users('[UserID]')/contacts('[ContactID]8RpGg5o6dTfn8AAAREHQNAAA=')

Body:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('[UserID]')/contactFolders('[ContactFolderID]')/contacts/$entity",
"@odata.etag": "W/"EQAAABYAAADbVMbNfh58RpGg5o6dTfn8AAARAHue"",
"id": "[ContactID]8RpGg5o6dTfn8AAAREHQNAAA=",
"createdDateTime": "2025-02-18T14:42:50Z",
"lastModifiedDateTime": "2025-02-18T14:42:50Z",
"changeKey": "EQAAABYAAADbVMbNfh58RpGg5o6dTfn8AAARAHue",
"categories": [],
"parentFolderId": "[ParentFolderID]",
"birthday": null,
"fileAs": "Doe",
"displayName": "John Doe",
"givenName": null,
"initials": "JDO",
"middleName": null,
"nickName": null,
"surname": null,
"title": null,
"yomiGivenName": null,
"yomiSurname": null,
"yomiCompanyName": null,
"generation": null,
"imAddresses": [],
"jobTitle": null,
"companyName": null,
"department": null,
"officeLocation": null,
"profession": null,
"businessHomePage": null,
"assistantName": null,
"manager": null,
"homePhones": [],
"mobilePhone": null,
"businessPhones": [],
"spouseName": null,
"personalNotes": "",
"children": [],
"emailAddresses": [],
"homeAddress": {},
"businessAddress": {},
"otherAddress": {}
}

DEBUG: [CmdletEndProcessing]: - New-MgUserContactFolderContact end processing.
DisplayName Id EmailAddresses


John Doe [ContactID]8RpGg5o6dTfn8AAAREHQNAAA= {}

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions