@Rich Matheisen : The value was created with get-aduser....but thats not the problem. The value stored in $anzeigenals is correct.
@GelnScales-6756: I think you are right. So i created the SingleValueExtendedProperties with the Graph Explorer to check if it works as you said. (I want to do that with Powershell later) Unfortunately it didn't work that way. It creates a new Contact, but now the EmailAddresses and the Display as field are empty. So i checked with the MAPI Editor (MFCMapi.exe) if the extended properties were set. And I saw, yes they are not empty and the correct values are in there.
Maybe you ore anyone else have an idea what's wrong?
HTTPMethod: POST
{
"givenName": "Test",
"surname": "Contact",
"singleValueExtendedProperties": [
{
"id": "String {00062004-0000-0000-C000-000000000046} Name PidLidEmail1DisplayName",
"value": "Testi Contacti"
},
{
"id": "String {00062004-0000-0000-C000-000000000046} Name PidLidEmail1AddressType",
"value": "SMTP"
},
{
"id": "String {00062004-0000-0000-C000-000000000046} Name PidLidEmail1EmailAddress",
"value": "Test.Contact@test.com"
},
{
"id": "String {00062004-0000-0000-C000-000000000046} Name PidLidEmail1OriginalDisplayName",
"value": "Test.Contact@test.com"
},
{
"id": "String {00062004-0000-0000-C000-000000000046} Name PidLidEmail1OriginalEntryId",
"value": "00000000812B1FA4BEA310199D6E00DD010F540200000190"
}
]
}