Skip to content

New-MgUserContactFolderContact - BodyParamater issue with Number #3258

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

Closed
PSFux25 opened this issue Apr 7, 2025 · 3 comments
Closed

New-MgUserContactFolderContact - BodyParamater issue with Number #3258

PSFux25 opened this issue Apr 7, 2025 · 3 comments
Labels
Bug: PowerShell type:bug A broken experience

Comments

@PSFux25
Copy link

PSFux25 commented Apr 7, 2025

Describe the bug

I am trying to create a contact in outlook (in folder) per powershell using New-MgUserContactFolderContact.
The contact should have a "PersonalNote" with a number. For example: 123456

Error:
New-MgUserContactFolderContact : were unable to deserialize
Status: 400 (BadRequest)
ErrorCode: UnableToDeserializePostBody

  • FullyQualifiedErrorId : UnableToDeserializePostBody,Microsoft.Graph.PowerShell.Cmdlets.NewMgUserContactFolderContact_Create

Expected behavior

New Contact created in a contact folder in outlook.

How to reproduce

$params = @{
GivenName = "A"
Surname = "B"
PersonalNotes = "123456"
}

Get-MgUserContactFolder -userid mr.test@contoso.com

$ContactFolderId = "........"

New-MgUserContactFolderContact -UserId mr.test@contoso.com -ContactFolderId $ContactFolderId -BodyParameter $params

SDK Version

2.26.1

Latest version known to work for scenario above?

2.25

Known Workarounds

PersonalNotes must include text, like "a123356".

$params = @{
GivenName = "A"
Surname = "B"
PersonalNotes = "text123456"
}

New-MgUserContactFolderContact -UserId "mr.test@contoso.com" -ContactFolderId $ContactFolderId -BodyParameter $params

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@PSFux25 PSFux25 added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Apr 7, 2025
@Fabslh
Copy link

Fabslh commented Apr 11, 2025

I have the same problem with the module and the version.

@timayabi2020
Copy link
Contributor

To be fixed in the next release

Image

@timayabi2020
Copy link
Contributor

Please update to the latest version 2.27.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: PowerShell type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

3 participants