OfficeDev/Interop-TestSuites

MSOXNSPI_S02_TC08_GetPropsSuccessWithFlagsContainsfEphID fails against our Exchange server

st-gwerner opened this issue · 4 comments

Against our exchange server, unit test MSOXNSPI_S02_TC08_GetPropsSuccessWithFlagsContainsfEphID fails when it tries to execute the section “Call NspiGetProps with input parameter proptags not set to null.”

The first set of GetProps calls succeeds, but the second set, requesting PidTagEntryId and PidTagAddressBookX509Certificate, fails. The response from our exchange server is below. Is there something we need to do to additionally configure the server to pass this test, or should we modify the test to request a different value instead of PidTagAddressBookX509Certificate? (The test assumes the call should return a 0 error code, but the server is returning a 263040 (ErrorsReturned))

GetPropsRequest
   Flags:2
   HasState:True
   State
      SortType:0
      ContainerID:0
      CurrentRec:9137
      Delta:0
      NumPos:0
      TotalRecs:0
      CodePage:20261
      TemplateLocale:1033
      SortLocale:1033
   HasPropertyTags:True
   PropertyTags
      PropertyTagCount:2
      PropertyTags
         PropertyTag
            PropertyType:PtypBinary
            PropertyId:PidTagEntryId
         PropertyTag
            PropertyType:PtypMultipleBinary
            PropertyId:PidTagAddressBookX509Certificate
   AuxiliaryBufferSize:0
GetPropsResponse
   MetaTags
      MAPIString
         Value:PROCESSING
      MAPIString
         Value:DONE
   AdditionalHeaders
      MAPIString
         Value:X-StartTime: Tue, 19 Feb 2019 16:21:41 GMT
      MAPIString
         Value:X-ElapsedTime: 3
      MAPIString
         Value:
   StatusCode:0
   ErrorCode:263040
   CodePage:20261
   HasPropertyValues:True
   PropertyValues
      PropertyValueCount:2
      PropertyValues
         AddressBookTaggedPropertyValue
            PropertyType:PtypBinary
            PropertyId:4095
            PropertyValue
               HasValue:True
               PropertyValue
                  Count:32
                  Value:[135,0,0,0,242,251,50,1,245,46,67,64,170,159,166,66,213,91,40,34,1,0,0,0,0,0,0,0,205,255...]
         AddressBookTaggedPropertyValue
            PropertyType:PtypErrorCode
            PropertyId:35946
            PropertyValue
               PropertyValue
                  Value:2147746063
   AuxiliaryBufferSize:0

Thanks in advance

I just saw in the setup document ExchangeMAPITestSuiteDeploymentGuide in 5.1.3:

  1. Export the HTTPS certificate of the web site which contains the application that implements the MAPI protocols, and add the certificate to the mailbox user MSOXNSPI_TestUser01.

If my admin missed this step, would this explain the behavior I'm seeing?

The error is that the property doesn't exist 2147746063(0x8004010F) so I think that's likely.

Take a look at the ExchangeSUTConfiguration.ps1:
...
Output "Add a certificate to $MSOXNSPIUser1." "White"
$certFile = "$env:SystemDrive" + "\CN=" + $sutComputerName + ".Cer"
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate $certFile
Import-Module ActiveDirectory
Set-ADUser "$MSOXNSPIUser1" -Certificates @{Add=$cert}

Thanks for the response. Looks like that did it.