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

o365 problem with finditems / (calendar)view for public folder calendar #204

Closed
frombalinium opened this Issue Aug 30, 2018 · 47 comments

Comments

Projects
None yet
@frombalinium

frombalinium commented Aug 30, 2018

As of yesterday it no longer works for office 365 while on-prem exchange (any version) is fine
Error: Microsoft.Exchange.WebServices.Data.ServiceError.ErrorCannotUseFolderIdForItemId
or in text "Expected an item Id but received a folder Id."

this example DOES work as long as you don't restrict it

Dim View1 As New ItemView(10)
View1.Traversal = ItemTraversal.Shallow
Dim Result As FindItemsResults(Of Item) = exService.FindItems(fldID, View1)

this does NOT work and produces above error

Dim cv As New CalendarView(DateTime.Now.AddYears(-1), DateTime.Now.AddDays(-1))
Dim cal As CalendarFolder = CalendarFolder.Bind(exService, fldID)
cv.MaxItemsReturned = 5
Dim items As FindItemsResults(Of Appointment) = cal.FindAppointments(cv)

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Aug 30, 2018

Contributor

Can you paste in your fldId value? Don't worry, it doesn't contain any PII.

Contributor

davster commented Aug 30, 2018

Can you paste in your fldId value? Don't worry, it doesn't contain any PII.

@frombalinium

This comment has been minimized.

Show comment
Hide comment
@frombalinium

frombalinium Aug 30, 2018

Here you are
AQEuAAADGkRzkKpmEc2byACqAC/EWgMAfFCxzz7DIUiyV6RXslk1GAAAAxgAAAA=

frombalinium commented Aug 30, 2018

Here you are
AQEuAAADGkRzkKpmEc2byACqAC/EWgMAfFCxzz7DIUiyV6RXslk1GAAAAxgAAAA=

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Aug 30, 2018

Contributor

Yep - that's a public folder id. No issues there. Which line does it fail on? Is it the FindAppointments call or the CalendarFolder.Bind? Also, do you by chance have the HTTP response headers, in particular the RequestId and X-BEServer headers?

Contributor

davster commented Aug 30, 2018

Yep - that's a public folder id. No issues there. Which line does it fail on? Is it the FindAppointments call or the CalendarFolder.Bind? Also, do you by chance have the HTTP response headers, in particular the RequestId and X-BEServer headers?

@frombalinium

This comment has been minimized.

Show comment
Hide comment
@frombalinium

frombalinium Aug 30, 2018

It binds fine. cal object has all the properties one would expect in debug mode.
It fails at .FindAppointments.
please note that the first example works correctly but that is not of much use when you need soemthing specific.

frombalinium commented Aug 30, 2018

It binds fine. cal object has all the properties one would expect in debug mode.
It fails at .FindAppointments.
please note that the first example works correctly but that is not of much use when you need soemthing specific.

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Aug 30, 2018

Contributor

Does this work for you against a non-public folder calendar?

Contributor

davster commented Aug 30, 2018

Does this work for you against a non-public folder calendar?

@frombalinium

This comment has been minimized.

Show comment
Hide comment
@frombalinium

frombalinium Aug 30, 2018

yes that works fine.
the public folder worked fine too for years until yesterday or so.

frombalinium commented Aug 30, 2018

yes that works fine.
the public folder worked fine too for years until yesterday or so.

@fpintos

This comment has been minimized.

Show comment
Hide comment
@fpintos

fpintos Aug 31, 2018

Hi @frombalinium , do you happen to have the requestID and X-BEServer headers that @davster asked for?

I wrote a LinqPad script to query the public folders accessible to a user and show the calendar items from the first calendar folder it finds; perhaps you can run it (or a modified version) and capture the response headers with Fiddler? That might give us a repro and additional information to work with.

Get the script in this GIST and use LinqPad to run it.

fpintos commented Aug 31, 2018

Hi @frombalinium , do you happen to have the requestID and X-BEServer headers that @davster asked for?

I wrote a LinqPad script to query the public folders accessible to a user and show the calendar items from the first calendar folder it finds; perhaps you can run it (or a modified version) and capture the response headers with Fiddler? That might give us a repro and additional information to work with.

Get the script in this GIST and use LinqPad to run it.

@frombalinium

This comment has been minimized.

Show comment
Hide comment
@frombalinium

frombalinium Aug 31, 2018

Sorry that I missed that part of Dave's request. Actually I was able to file a support request today and the engineer (Pedro) looked at the EWS server logs today using my trace. He said that on monday he was able to proceed with the team. If you are able to look at it already that would be great.
This is just a restricted finditem call. This also fails. It's not just with appointment type items. Looks like anything you restrict will produce the problem. Also it fails for multiple o365 clients (and for no on-prem users). I would expect your script to fail as well. Here is the trace. Would that be enough for you right now?
29-8-2018 21:03:09 : EwsRequestHttpHeaders ---
POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0913.015
Accept-Encoding: gzip,deflate
X-AnchorMailbox: removed@removed.com
X-PreferServerAffinity: True
X-PublicFolderMailbox: removed@removed.onmicrosoft.com

29-8-2018 21:03:09 : EwsRequest ---

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
soap:Header
<t:RequestServerVersion Version="Exchange2013" />
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:SmtpAddress>removed@removed.com</t:SmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
soap:Body
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:ExtendedFieldURI PropertySetId="1cb963f5-dfeb-4494-9961-9ce0f43097c8" PropertyName="removed" PropertyType="String" />
</t:AdditionalProperties>
</m:ItemShape>
<m:IndexedPageItemView MaxEntriesReturned="10" Offset="0" BasePoint="Beginning" />
<m:Restriction>
<t:IsEqualTo>
<t:ExtendedFieldURI PropertySetId="1cb963f5-dfeb-4494-9961-9ce0f43097c8" PropertyName="removed" PropertyType="String" />
<t:FieldURIOrConstant>
<t:Constant Value="BAAAAIIA4AB0xbcQGoLgCAAAAADQpR6txTvUAQAAAAAAAAAAEAAAACIjd+dTvWBEk5bvRFCr++0=" />
</t:FieldURIOrConstant>
</t:IsEqualTo>
</m:Restriction>
<m:ParentFolderIds>
<t:FolderId Id="AQEuAAADGkRzkKpmEc2byACqAC/EWgMAfFCxzz7DIUiyV6RXslk1GAAAAxgAAAA=" ChangeKey="AgAAABYAAAB8ULHPPsMhSLJXpFeyWTUYAAH/Ky2F" />
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
</soap:Envelope>

29-8-2018 21:03:09 : EwsResponseHttpHeaders ---
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Encoding: gzip
Vary: Accept-Encoding
request-id: c152cf90-8e0e-4255-af79-d145311250eb
X-CalculatedFETarget: DM5PR0401CU002.internal.outlook.com
X-BackEndHttpStatus: 200,200
X-FEProxyInfo: DM5PR0401CA0053.NAMPRD04.PROD.OUTLOOK.COM
X-CalculatedBETarget: DM5PR03MB2796.namprd03.prod.outlook.com
X-RUM-Validated: 1
x-EwsHandler: FindItem
X-BeSku: Gen9
X-DiagInfo: DM5PR03MB2796
X-BEServer: DM5PR03MB2796
X-FEServer: DM5PR0401CA0053,AM6PR0402CA0035
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Date: Wed, 29 Aug 2018 19:03:06 GMT
Set-Cookie: exchangecookie=eab33aaab4b04040800eb7e6a6d02416; path=/
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET

29-8-2018 21:03:09 : EwsResponse ---

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1101" MinorBuildNumber="14" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>
<s:Body>
<m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:FindItemResponseMessage ResponseClass="Error">
<m:MessageText>Expected an item Id but received a folder Id.</m:MessageText>
<m:ResponseCode>ErrorCannotUseFolderIdForItemId</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
</m:FindItemResponseMessage>
</m:ResponseMessages>
</m:FindItemResponse>
</s:Body>
</s:Envelope>

frombalinium commented Aug 31, 2018

Sorry that I missed that part of Dave's request. Actually I was able to file a support request today and the engineer (Pedro) looked at the EWS server logs today using my trace. He said that on monday he was able to proceed with the team. If you are able to look at it already that would be great.
This is just a restricted finditem call. This also fails. It's not just with appointment type items. Looks like anything you restrict will produce the problem. Also it fails for multiple o365 clients (and for no on-prem users). I would expect your script to fail as well. Here is the trace. Would that be enough for you right now?
29-8-2018 21:03:09 : EwsRequestHttpHeaders ---
POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0913.015
Accept-Encoding: gzip,deflate
X-AnchorMailbox: removed@removed.com
X-PreferServerAffinity: True
X-PublicFolderMailbox: removed@removed.onmicrosoft.com

29-8-2018 21:03:09 : EwsRequest ---

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
soap:Header
<t:RequestServerVersion Version="Exchange2013" />
<t:ExchangeImpersonation>
<t:ConnectingSID>
<t:SmtpAddress>removed@removed.com</t:SmtpAddress>
</t:ConnectingSID>
</t:ExchangeImpersonation>
</soap:Header>
soap:Body
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:ExtendedFieldURI PropertySetId="1cb963f5-dfeb-4494-9961-9ce0f43097c8" PropertyName="removed" PropertyType="String" />
</t:AdditionalProperties>
</m:ItemShape>
<m:IndexedPageItemView MaxEntriesReturned="10" Offset="0" BasePoint="Beginning" />
<m:Restriction>
<t:IsEqualTo>
<t:ExtendedFieldURI PropertySetId="1cb963f5-dfeb-4494-9961-9ce0f43097c8" PropertyName="removed" PropertyType="String" />
<t:FieldURIOrConstant>
<t:Constant Value="BAAAAIIA4AB0xbcQGoLgCAAAAADQpR6txTvUAQAAAAAAAAAAEAAAACIjd+dTvWBEk5bvRFCr++0=" />
</t:FieldURIOrConstant>
</t:IsEqualTo>
</m:Restriction>
<m:ParentFolderIds>
<t:FolderId Id="AQEuAAADGkRzkKpmEc2byACqAC/EWgMAfFCxzz7DIUiyV6RXslk1GAAAAxgAAAA=" ChangeKey="AgAAABYAAAB8ULHPPsMhSLJXpFeyWTUYAAH/Ky2F" />
</m:ParentFolderIds>
</m:FindItem>
</soap:Body>
</soap:Envelope>

29-8-2018 21:03:09 : EwsResponseHttpHeaders ---
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Encoding: gzip
Vary: Accept-Encoding
request-id: c152cf90-8e0e-4255-af79-d145311250eb
X-CalculatedFETarget: DM5PR0401CU002.internal.outlook.com
X-BackEndHttpStatus: 200,200
X-FEProxyInfo: DM5PR0401CA0053.NAMPRD04.PROD.OUTLOOK.COM
X-CalculatedBETarget: DM5PR03MB2796.namprd03.prod.outlook.com
X-RUM-Validated: 1
x-EwsHandler: FindItem
X-BeSku: Gen9
X-DiagInfo: DM5PR03MB2796
X-BEServer: DM5PR03MB2796
X-FEServer: DM5PR0401CA0053,AM6PR0402CA0035
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Date: Wed, 29 Aug 2018 19:03:06 GMT
Set-Cookie: exchangecookie=eab33aaab4b04040800eb7e6a6d02416; path=/
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET

29-8-2018 21:03:09 : EwsResponse ---

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1101" MinorBuildNumber="14" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
</s:Header>
<s:Body>
<m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:FindItemResponseMessage ResponseClass="Error">
<m:MessageText>Expected an item Id but received a folder Id.</m:MessageText>
<m:ResponseCode>ErrorCannotUseFolderIdForItemId</m:ResponseCode>
<m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
</m:FindItemResponseMessage>
</m:ResponseMessages>
</m:FindItemResponse>
</s:Body>
</s:Envelope>

@frombalinium

This comment has been minimized.

Show comment
Hide comment
@frombalinium

frombalinium Sep 1, 2018

I tried the script @fpintos but it uses oauth so connects me to my personal account that I have not set up. Instead I ran the above {cal.FindAppointments(cv) } code and cached it with fiddler for you if it is of any help. It does essentialy the same as your script.

POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0913.015
Accept-Encoding: gzip,deflate
X-AnchorMailbox: removed@Client.com
X-PreferServerAffinity: True
X-PublicFolderMailbox: removed_75a66972@removed.onmicrosoft.com
X-ClientStatistics: MessageId=b7cc2545-7cf1-45f3-9ef7-641a3d31fe11,ResponseTime=374,SoapAction=GetFolder;
Authorization: Basic R0NhZG1pbkBDcmFuZWwuY29tOkdyb3VwQ2FsISEh
Host: outlook.office365.com
Cookie: EXOBasicAuth=compactTicket=t%3dEwAIA9P5AwAUv0lYxoez7x2t6RowHa2liVeLW%2fwAATNF%2frMCmst9eaqwXDf6cg5hU9lwDFyeenTFCokkDZGoEwAOpfNfyV7roeakrZvI6vN1UmalRzzEpF0jfKPFw%2b9qmGYwo2inSOodw2G%2fVKJ6qJKapWp60agp25lmCKxpZKdPM8F4sdEoGCF%2f%2bHjIhV36VFFLdcXXZlS81x78CDifrXa4yZCw3DqQnVpn%2b9cc0qUCBgXjeRwMtsfGuJu%2fgU3PrfRGNb3svpGo2SxFdnTKAmumkSUsjku4byd3DZtWSbeQ0%2fMb%2fap%2bQZse3BTIkMgDdMbzeWAQuh8pwDxffJvbgqb9Zgrk5Ei6d4XwyG7a1NFZaSbz0b8SkZLUZ9Hui0wDZgAACKL8MZDmo%2bQq2AGg5erDWhQCci0CQfbScRuNHiaPlY90oTTHxXgqA8OUSFdFXnYK%2fsb7ZMg33ICcm1vqlvjPyAinAmCQNOoXy%2fouwSPz93adapwF0c%2bMhdll2xn03KZBHMIPm17cImraOL8jnjVzTauvcxW%2fQCXTnTal1rmjITvGo3gJLV1vDVZh50XCDi4e4pCpSSa4zXurvMbnfLHCbjzKAMiO4X1FHKdu%2fQb4Yydu0iDIMalARkmzRW9ByIZdumsySq0BQ%2bj%2feaEaMn6EV46XZ32LPcww2a4YD%2fFTR%2bl4zOeuDmj5RpSTrxLweGU25GD9mPx9FL2BN8VC9y6SNrQiKk5l5xQBz9gd1LOwzeXpRN1107DYLTN7GtZlDVvW%2bq4Mbr35umwatP9%2f6x0rhoffsRLvJ4H7td1ReP1w3NnG4gbpYwV7emui4nf7J0bnrkUxPXwW%2fCGewNNWmKrWyQkyzJ3x3GFbV3js7EbR3PBZrVCiecPUhrBge0Jm17%2bU0t1cMjaY44Ix3BX543kA4vVIhy%2bO4CopvTXWvBs8%2bMe0J6BxQRhrwyp6T2NwpcjQDn2kgIR1RoXDVM0OVGPZz0aBp4cR1TU61wrrLBFk9Hs4sRE9qMkpSsSkENb8TJfv0VZCLAI%3d%26amp%3bp%3d&key=removed%40removed.com+microsoft.exchange.webservices+80.101.30.35+&signature=igxo1dylDw8WUm38LpOz+3GPqkYbD/g6CQhr6nPB7k+rD51f+wdtrx25dVwF0/5nqJVh+o6TSCU13OK6hgnjuasEgxBFZyfouGZDBY2nTsbF89j9Ij90LyJGXUB9mTMw/uVSx7tTApJMRDGcis2pWTtT48WRE3K7SfvQSQXOru7Iqt89ermcW8iBLn08Ebos1xYEZu5dSiAvs54fVo8Y4X465YkoWLzEOwVqQukrlSDAbhTYTkX5NU4CXxGAnsslS9jE6MdYwgWq8W9ujnhzvA5vga3F7kPr88V0Z6sFpEDDLfNQFAE7xEh/40CNBTZR39Ib/49n5JOM/WpFC7zgAA==&puid=100300009760C6E9&expireTime=636713864200000000&membername=removed%40removed.com&flags=False&userType=ManagedBusiness&ageGroup=0; exchangecookie=81c4d5fce9594cf5a8d72ec26e6edde1
Content-Length: 1088
Expect: 100-continue

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Vary: Accept-Encoding
Server: Microsoft-IIS/10.0
request-id: bf2ff654-ddd9-4122-bd03-e370c6c8b940
X-CalculatedFETarget: CY4PR1201CU001.internal.outlook.com
X-BackEndHttpStatus: 200
Set-Cookie: exchangecookie=81c4d5fce9594cf5a8d72ec26e6edde1; path=/
X-FEProxyInfo: CY4PR1201CA0013.NAMPRD12.PROD.OUTLOOK.COM
X-CalculatedBETarget: CY4PR03MB3238.namprd03.prod.outlook.com
X-BackEndHttpStatus: 200
X-RUM-Validated: 1
x-EwsHandler: FindItem
X-AspNet-Version: 4.0.30319
X-BeSku: WCS5
X-DiagInfo: CY4PR03MB3238
X-BEServer: CY4PR03MB3238
X-FEServer: CY4PR1201CA0013
X-Powered-By: ASP.NET
X-FEServer: AM6PR0202CA0002
Date: Sat, 01 Sep 2018 00:23:53 GMT
Content-Length: 1029

frombalinium commented Sep 1, 2018

I tried the script @fpintos but it uses oauth so connects me to my personal account that I have not set up. Instead I ran the above {cal.FindAppointments(cv) } code and cached it with fiddler for you if it is of any help. It does essentialy the same as your script.

POST /EWS/Exchange.asmx HTTP/1.1
Content-Type: text/xml; charset=utf-8
Accept: text/xml
User-Agent: ExchangeServicesClient/15.00.0913.015
Accept-Encoding: gzip,deflate
X-AnchorMailbox: removed@Client.com
X-PreferServerAffinity: True
X-PublicFolderMailbox: removed_75a66972@removed.onmicrosoft.com
X-ClientStatistics: MessageId=b7cc2545-7cf1-45f3-9ef7-641a3d31fe11,ResponseTime=374,SoapAction=GetFolder;
Authorization: Basic R0NhZG1pbkBDcmFuZWwuY29tOkdyb3VwQ2FsISEh
Host: outlook.office365.com
Cookie: EXOBasicAuth=compactTicket=t%3dEwAIA9P5AwAUv0lYxoez7x2t6RowHa2liVeLW%2fwAATNF%2frMCmst9eaqwXDf6cg5hU9lwDFyeenTFCokkDZGoEwAOpfNfyV7roeakrZvI6vN1UmalRzzEpF0jfKPFw%2b9qmGYwo2inSOodw2G%2fVKJ6qJKapWp60agp25lmCKxpZKdPM8F4sdEoGCF%2f%2bHjIhV36VFFLdcXXZlS81x78CDifrXa4yZCw3DqQnVpn%2b9cc0qUCBgXjeRwMtsfGuJu%2fgU3PrfRGNb3svpGo2SxFdnTKAmumkSUsjku4byd3DZtWSbeQ0%2fMb%2fap%2bQZse3BTIkMgDdMbzeWAQuh8pwDxffJvbgqb9Zgrk5Ei6d4XwyG7a1NFZaSbz0b8SkZLUZ9Hui0wDZgAACKL8MZDmo%2bQq2AGg5erDWhQCci0CQfbScRuNHiaPlY90oTTHxXgqA8OUSFdFXnYK%2fsb7ZMg33ICcm1vqlvjPyAinAmCQNOoXy%2fouwSPz93adapwF0c%2bMhdll2xn03KZBHMIPm17cImraOL8jnjVzTauvcxW%2fQCXTnTal1rmjITvGo3gJLV1vDVZh50XCDi4e4pCpSSa4zXurvMbnfLHCbjzKAMiO4X1FHKdu%2fQb4Yydu0iDIMalARkmzRW9ByIZdumsySq0BQ%2bj%2feaEaMn6EV46XZ32LPcww2a4YD%2fFTR%2bl4zOeuDmj5RpSTrxLweGU25GD9mPx9FL2BN8VC9y6SNrQiKk5l5xQBz9gd1LOwzeXpRN1107DYLTN7GtZlDVvW%2bq4Mbr35umwatP9%2f6x0rhoffsRLvJ4H7td1ReP1w3NnG4gbpYwV7emui4nf7J0bnrkUxPXwW%2fCGewNNWmKrWyQkyzJ3x3GFbV3js7EbR3PBZrVCiecPUhrBge0Jm17%2bU0t1cMjaY44Ix3BX543kA4vVIhy%2bO4CopvTXWvBs8%2bMe0J6BxQRhrwyp6T2NwpcjQDn2kgIR1RoXDVM0OVGPZz0aBp4cR1TU61wrrLBFk9Hs4sRE9qMkpSsSkENb8TJfv0VZCLAI%3d%26amp%3bp%3d&key=removed%40removed.com+microsoft.exchange.webservices+80.101.30.35+&signature=igxo1dylDw8WUm38LpOz+3GPqkYbD/g6CQhr6nPB7k+rD51f+wdtrx25dVwF0/5nqJVh+o6TSCU13OK6hgnjuasEgxBFZyfouGZDBY2nTsbF89j9Ij90LyJGXUB9mTMw/uVSx7tTApJMRDGcis2pWTtT48WRE3K7SfvQSQXOru7Iqt89ermcW8iBLn08Ebos1xYEZu5dSiAvs54fVo8Y4X465YkoWLzEOwVqQukrlSDAbhTYTkX5NU4CXxGAnsslS9jE6MdYwgWq8W9ujnhzvA5vga3F7kPr88V0Z6sFpEDDLfNQFAE7xEh/40CNBTZR39Ib/49n5JOM/WpFC7zgAA==&puid=100300009760C6E9&expireTime=636713864200000000&membername=removed%40removed.com&flags=False&userType=ManagedBusiness&ageGroup=0; exchangecookie=81c4d5fce9594cf5a8d72ec26e6edde1
Content-Length: 1088
Expect: 100-continue

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Vary: Accept-Encoding
Server: Microsoft-IIS/10.0
request-id: bf2ff654-ddd9-4122-bd03-e370c6c8b940
X-CalculatedFETarget: CY4PR1201CU001.internal.outlook.com
X-BackEndHttpStatus: 200
Set-Cookie: exchangecookie=81c4d5fce9594cf5a8d72ec26e6edde1; path=/
X-FEProxyInfo: CY4PR1201CA0013.NAMPRD12.PROD.OUTLOOK.COM
X-CalculatedBETarget: CY4PR03MB3238.namprd03.prod.outlook.com
X-BackEndHttpStatus: 200
X-RUM-Validated: 1
x-EwsHandler: FindItem
X-AspNet-Version: 4.0.30319
X-BeSku: WCS5
X-DiagInfo: CY4PR03MB3238
X-BEServer: CY4PR03MB3238
X-FEServer: CY4PR1201CA0013
X-Powered-By: ASP.NET
X-FEServer: AM6PR0202CA0002
Date: Sat, 01 Sep 2018 00:23:53 GMT
Content-Length: 1029

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 1, 2018

Contributor

That is great. Thank you for the trace information. Could you do me a favor and tell me what the property name is that you are using? It is marked as removed in your traces. With that information, I should be able to reproduce it on our side. I am curious if that extended property that you are specifying actually maps to a well-known schema property which happens to have a strong type. This could explain why it is complaining about a wrong ID type.

Contributor

davster commented Sep 1, 2018

That is great. Thank you for the trace information. Could you do me a favor and tell me what the property name is that you are using? It is marked as removed in your traces. With that information, I should be able to reproduce it on our side. I am curious if that extended property that you are specifying actually maps to a well-known schema property which happens to have a strong type. This could explain why it is complaining about a wrong ID type.

@frombalinium

This comment has been minimized.

Show comment
Hide comment
@frombalinium

frombalinium Sep 1, 2018

@davster
I don't think that is the problem because the other example fails as well (with the calendar view) however if it helps to repro: PropertyName="Bla_UID"

frombalinium commented Sep 1, 2018

@davster
I don't think that is the problem because the other example fails as well (with the calendar view) however if it helps to repro: PropertyName="Bla_UID"

@mpodonyi

This comment has been minimized.

Show comment
Hide comment
@mpodonyi

mpodonyi Sep 3, 2018

We are having exactly the same problem with "FindItems".
The difference for us is, that we are in a Public Folder and try to receive all E-Mail Groups within this folder.
The exception started to appear ~3 days ago.
No change in code or by the admins.

mpodonyi commented Sep 3, 2018

We are having exactly the same problem with "FindItems".
The difference for us is, that we are in a Public Folder and try to receive all E-Mail Groups within this folder.
The exception started to appear ~3 days ago.
No change in code or by the admins.

@SchultzAndreas

This comment has been minimized.

Show comment
Hide comment
@SchultzAndreas

SchultzAndreas Sep 3, 2018

It seems to be a bug in the Office 365 API. I suddenly have the same problem a few days ago. Also at FindFolders().

SchultzAndreas commented Sep 3, 2018

It seems to be a bug in the Office 365 API. I suddenly have the same problem a few days ago. Also at FindFolders().

@brukwa

This comment has been minimized.

Show comment
Hide comment
@brukwa

brukwa Sep 3, 2018

I have reproduced this issue on my German tennant using Ews Editor
Currently I am unable to enumerate the list of properties for any Folder that is not IPF.Note.
Ews Editor will not display properties for Calendars, Contacts and Tasks in Public Folders hierarchy.

I have created a folder using Outlook. It will not load in Ews Editor. Exception is thrown in (propset) CalendarFolder.Load

I was trying to create a Calendar with Ews Editor and it throws this Exception from Folder.Bind

Is it possible that recently some updates were applied to Exchange Online.

brukwa commented Sep 3, 2018

I have reproduced this issue on my German tennant using Ews Editor
Currently I am unable to enumerate the list of properties for any Folder that is not IPF.Note.
Ews Editor will not display properties for Calendars, Contacts and Tasks in Public Folders hierarchy.

I have created a folder using Outlook. It will not load in Ews Editor. Exception is thrown in (propset) CalendarFolder.Load

I was trying to create a Calendar with Ews Editor and it throws this Exception from Folder.Bind

Is it possible that recently some updates were applied to Exchange Online.

@Cadburry

This comment has been minimized.

Show comment
Hide comment
@Cadburry

Cadburry Sep 4, 2018

I'm facing the same issue since a few days ago (also German versions -but i dont think it has something to do with the langauge.. more with the serviceversion behind)
I get the Microsoft.Exchange.WebServices.Data.ServiceResponseException:Expected an item Id but received a folder Id on calling Folder.Load()
with a property set of:
new PropertySet(FolderSchema.DisplayName, FolderSchema.ChildFolderCount, FolderSchema.TotalCount)
On my side the problem only occurs with Public-Folders! (I'm targeting a public contact folder, with the contactfolder of the mailbox it works)

Cadburry commented Sep 4, 2018

I'm facing the same issue since a few days ago (also German versions -but i dont think it has something to do with the langauge.. more with the serviceversion behind)
I get the Microsoft.Exchange.WebServices.Data.ServiceResponseException:Expected an item Id but received a folder Id on calling Folder.Load()
with a property set of:
new PropertySet(FolderSchema.DisplayName, FolderSchema.ChildFolderCount, FolderSchema.TotalCount)
On my side the problem only occurs with Public-Folders! (I'm targeting a public contact folder, with the contactfolder of the mailbox it works)

@ngyongzhen

This comment has been minimized.

Show comment
Hide comment
@ngyongzhen

ngyongzhen Sep 5, 2018

There is a workaround for this.
Instead of using folderObject.Id as the argument, explicitly creating the FolderId and use that as argument.
Example:
FolderId folderId = new FolderId(folderObject.Id.toString());
<-- EWS API call with folderId instead of folderObject.Id-->

Having said that, it is clearly an issue on Microsoft's end. I am hoping they roll-out a fix for this ASAP.

Note: It appears that this error does not affect ALL O365 tenants. Some tenants works fine while others encounter this error despite running the same code.

ngyongzhen commented Sep 5, 2018

There is a workaround for this.
Instead of using folderObject.Id as the argument, explicitly creating the FolderId and use that as argument.
Example:
FolderId folderId = new FolderId(folderObject.Id.toString());
<-- EWS API call with folderId instead of folderObject.Id-->

Having said that, it is clearly an issue on Microsoft's end. I am hoping they roll-out a fix for this ASAP.

Note: It appears that this error does not affect ALL O365 tenants. Some tenants works fine while others encounter this error despite running the same code.

@SirHenryIII

This comment has been minimized.

Show comment
Hide comment
@SirHenryIII

SirHenryIII Sep 5, 2018

Our Tenant is in the US but I'm working from Germany, don't know if this matter. In my case I tried to open a PF Contact Group. Changed my PowerShell Script
$EWSFolderId = New-Object -TypeName Microsoft.Exchange.WebServices.Data.FolderId($EWSFolder.Id.ToString()) #$SearchResult = $EWSFolder.FindItems($Filter, $View) $SearchResult = $EWS.FindItems($EWSFolderId, $Filter, $View)

Thanks for the Workaround @ngyongzhen

SirHenryIII commented Sep 5, 2018

Our Tenant is in the US but I'm working from Germany, don't know if this matter. In my case I tried to open a PF Contact Group. Changed my PowerShell Script
$EWSFolderId = New-Object -TypeName Microsoft.Exchange.WebServices.Data.FolderId($EWSFolder.Id.ToString()) #$SearchResult = $EWSFolder.FindItems($Filter, $View) $SearchResult = $EWS.FindItems($EWSFolderId, $Filter, $View)

Thanks for the Workaround @ngyongzhen

@Cadburry

This comment has been minimized.

Show comment
Hide comment
@Cadburry

Cadburry Sep 5, 2018

@ngyongzhen ok.. Thx! - but this doesnt fit to my requirements i'm binding a Folder in c# like this:

var contactsfolder = Folder.Bind(service,
                     new FolderId(Settings.FolderID),
                     new PropertySet(BasePropertySet.IdOnly, FolderSchema.TotalCount, FolderSchema.DisplayName));

 contactsfolder.Load(new PropertySet(FolderSchema.DisplayName, FolderSchema.ChildFolderCount, FolderSchema.TotalCount));

on folder.Load the exception is raised.
Does anybody know.. does the exception message "Expected an item Id but received a folder Id" comes from the service-side or is the message generated and raised by the managed-api?

Cadburry commented Sep 5, 2018

@ngyongzhen ok.. Thx! - but this doesnt fit to my requirements i'm binding a Folder in c# like this:

var contactsfolder = Folder.Bind(service,
                     new FolderId(Settings.FolderID),
                     new PropertySet(BasePropertySet.IdOnly, FolderSchema.TotalCount, FolderSchema.DisplayName));

 contactsfolder.Load(new PropertySet(FolderSchema.DisplayName, FolderSchema.ChildFolderCount, FolderSchema.TotalCount));

on folder.Load the exception is raised.
Does anybody know.. does the exception message "Expected an item Id but received a folder Id" comes from the service-side or is the message generated and raised by the managed-api?

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 5, 2018

Contributor

We identified the problem on the server side and I checked in a fix for it last night. I am going to see if we can push out the changes quickly to unblock you. I am currently backporting the fix to the dominant build in production so this should roll out in the next few days. Sorry for the inconvenience.

Contributor

davster commented Sep 5, 2018

We identified the problem on the server side and I checked in a fix for it last night. I am going to see if we can push out the changes quickly to unblock you. I am currently backporting the fix to the dominant build in production so this should roll out in the next few days. Sorry for the inconvenience.

@ellingent

This comment has been minimized.

Show comment
Hide comment
@ellingent

ellingent Sep 5, 2018

Thank you for fixing this!

ellingent commented Sep 5, 2018

Thank you for fixing this!

@bureyburey

This comment has been minimized.

Show comment
Hide comment
@bureyburey

bureyburey Sep 6, 2018

any ETA on when the fix will be up?

bureyburey commented Sep 6, 2018

any ETA on when the fix will be up?

@Codesmiths

This comment has been minimized.

Show comment
Hide comment
@Codesmiths

Codesmiths Sep 6, 2018

Any ETA on this? The "work around" does not work for me, and this is killing a production application.

Codesmiths commented Sep 6, 2018

Any ETA on this? The "work around" does not work for me, and this is killing a production application.

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 6, 2018

Contributor

The fix is checked in and I am currently backporting the changes to previous builds. Those should go in today and then a few days for rollout (estimate).

Contributor

davster commented Sep 6, 2018

The fix is checked in and I am currently backporting the changes to previous builds. Those should go in today and then a few days for rollout (estimate).

@bureyburey

This comment has been minimized.

Show comment
Hide comment
@bureyburey

bureyburey Sep 6, 2018

Nice
Thanks for keeping us updated :)

bureyburey commented Sep 6, 2018

Nice
Thanks for keeping us updated :)

@Codesmiths

This comment has been minimized.

Show comment
Hide comment
@Codesmiths

Codesmiths Sep 6, 2018

Thank you!

Codesmiths commented Sep 6, 2018

Thank you!

@aluitink

This comment has been minimized.

Show comment
Hide comment
@aluitink

aluitink Sep 7, 2018

Anyone know if there is a Service Health advisory or incident ID for this?

aluitink commented Sep 7, 2018

Anyone know if there is a Service Health advisory or incident ID for this?

@aluitink

This comment has been minimized.

Show comment
Hide comment
@aluitink

aluitink Sep 10, 2018

@davster can you confirm this fix is deployed? I've tested and no longer seeing this issue.

aluitink commented Sep 10, 2018

@davster can you confirm this fix is deployed? I've tested and no longer seeing this issue.

@Cadburry

This comment has been minimized.

Show comment
Hide comment
@Cadburry

Cadburry Sep 10, 2018

@aluitink @davster I'm still facing the issue - maybe it has not been deployed on all sites yet and deploying is in progress.. - i will try it again later - will keep you updated!

Cadburry commented Sep 10, 2018

@aluitink @davster I'm still facing the issue - maybe it has not been deployed on all sites yet and deploying is in progress.. - i will try it again later - will keep you updated!

@aluitink

This comment has been minimized.

Show comment
Hide comment
@aluitink

aluitink Sep 10, 2018

@Cadburry, I've continued testing and also still see this issues intermittently.

aluitink commented Sep 10, 2018

@Cadburry, I've continued testing and also still see this issues intermittently.

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 10, 2018

Contributor

The fix is rolling out WW. As such, there will be some servers that have been patched and some that have not which will give you the intermittent behavior you are seeing. This could even be true for a single mailbox as the database holding the mailbox could be load balanced to another server, etc... But we should be in this state for only a short period of time.

Contributor

davster commented Sep 10, 2018

The fix is rolling out WW. As such, there will be some servers that have been patched and some that have not which will give you the intermittent behavior you are seeing. This could even be true for a single mailbox as the database holding the mailbox could be load balanced to another server, etc... But we should be in this state for only a short period of time.

@frukeus

This comment has been minimized.

Show comment
Hide comment
@frukeus

frukeus Sep 11, 2018

@davster Thanks for the update. Still no working for us. Are there any channels where we can check if the fix has been rolled out into our tenant? service health, twitter etc?

frukeus commented Sep 11, 2018

@davster Thanks for the update. Still no working for us. Are there any channels where we can check if the fix has been rolled out into our tenant? service health, twitter etc?

@Cadburry

This comment has been minimized.

Show comment
Hide comment
@Cadburry

Cadburry Sep 11, 2018

@davster Thanks a lot for your efforts - its working now again on my side!!
@aluitink

Cadburry commented Sep 11, 2018

@davster Thanks a lot for your efforts - its working now again on my side!!
@aluitink

@Aym3nTN

This comment has been minimized.

Show comment
Hide comment
@Aym3nTN

Aym3nTN Sep 11, 2018

@davster Thanks for your efforts! Please let us know once the fix is rolled out WW.

Aym3nTN commented Sep 11, 2018

@davster Thanks for your efforts! Please let us know once the fix is rolled out WW.

@frombalinium

This comment has been minimized.

Show comment
Hide comment
@frombalinium

frombalinium Sep 11, 2018

Thanks guys @Microsoft for monitoring this forum and picking it up.
A couple of clients have reported that the software now works again as it used to and the bug is gone.
I do want to share with you that the support experience through the official channels was a rough one.
o365 support did a remote session, concluded that there was indeed a problem and it ended there. I think these guys should have a way to escalate such issues including the call history. I posted my problem on technet and redit first without anyone seriously looking at it. I had 5 customers calling microsoft to report the problem to get some call volume hoping that it would ring a bell. It's only after posting to this forum that the ball started rolling (for which I am utterly gratefull). During a week or so I was taking the blows of upset customers before I had anything to show that it was indeed a bug in EWS.
Next time I will post the issue directly here knowing that the good guys are watching it! Thanks again.

frombalinium commented Sep 11, 2018

Thanks guys @Microsoft for monitoring this forum and picking it up.
A couple of clients have reported that the software now works again as it used to and the bug is gone.
I do want to share with you that the support experience through the official channels was a rough one.
o365 support did a remote session, concluded that there was indeed a problem and it ended there. I think these guys should have a way to escalate such issues including the call history. I posted my problem on technet and redit first without anyone seriously looking at it. I had 5 customers calling microsoft to report the problem to get some call volume hoping that it would ring a bell. It's only after posting to this forum that the ball started rolling (for which I am utterly gratefull). During a week or so I was taking the blows of upset customers before I had anything to show that it was indeed a bug in EWS.
Next time I will post the issue directly here knowing that the good guys are watching it! Thanks again.

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 13, 2018

Contributor

@frombalinium - thanks for the input. I have forwarded your concerns about your support experience to our internal group to see how we can improve. I agree that the experience that you described above isn't acceptable. The various dev teams do subscribe to these channels, so there is definitely MSFT presence on these from the product side of things. Let me know if you run into any more related issues.

Contributor

davster commented Sep 13, 2018

@frombalinium - thanks for the input. I have forwarded your concerns about your support experience to our internal group to see how we can improve. I agree that the experience that you described above isn't acceptable. The various dev teams do subscribe to these channels, so there is definitely MSFT presence on these from the product side of things. Let me know if you run into any more related issues.

@Lantizia

This comment has been minimized.

Show comment
Hide comment
@Lantizia

Lantizia Sep 26, 2018

Hey,

On the same day this issue was logged we also noticed a script stopped working. I've boiled it down to what we send and what we get back...

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <s:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1"/>
  </s:Header>
  <s:Body>
    <m:FindItem>
      <m:ItemShape>
        <t:AdditionalProperties>
          <t:FieldURI FieldURI="item:Subject"/>
          <t:FieldURI FieldURI="calendar:IsAllDayEvent"/>
          <t:FieldURI FieldURI="calendar:StartWallClock"/>
          <t:FieldURI FieldURI="calendar:EndWallClock"/>
        </t:AdditionalProperties>
      </m:ItemShape>
      <m:IndexedPageItemView Offset="0"/>
      <m:ParentFolderIds>
        <t:FolderId Id="AQEuAAADGkRzkKpmEc2byACqAC/EWgMAouZN+j474U2fhmokbCNCbwADGTqv/AAAAA=="/>
      </m:ParentFolderIds>
    </m:FindItem>
  </s:Body>
</s:Envelope>

Response...

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1143" MinorBuildNumber="18" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  </s:Header>
  <s:Body>
    <m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <m:ResponseMessages>
        <m:FindItemResponseMessage ResponseClass="Error">
          <m:MessageText>The specified object was not found in the store., Item not found.</m:MessageText>
          <m:ResponseCode>ErrorItemNotFound</m:ResponseCode>
          <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
        </m:FindItemResponseMessage>
      </m:ResponseMessages>
    </m:FindItemResponse>
  </s:Body>
</s:Envelope>

The error just isn't true, the folder ID is perfectly fine and there are those items to find within it.

You said a bug fix was being applied worldwide but given no way to track this :(. I've opened a ticket (number 11536035) with the 365 support team but got nothing back - probably because they're confused on what on earth this Github issue is about (as I linked to it).

If you have an alternate way of doing this request (an XML example like above would be useful - as this is a bash script using curl, yes BASH :P) that'd be handy in the meanwhile. I've looked at the workarounds supplied but I can't see how they'd translate to what would actually be sent XML wise.

Lantizia commented Sep 26, 2018

Hey,

On the same day this issue was logged we also noticed a script stopped working. I've boiled it down to what we send and what we get back...

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <s:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1"/>
  </s:Header>
  <s:Body>
    <m:FindItem>
      <m:ItemShape>
        <t:AdditionalProperties>
          <t:FieldURI FieldURI="item:Subject"/>
          <t:FieldURI FieldURI="calendar:IsAllDayEvent"/>
          <t:FieldURI FieldURI="calendar:StartWallClock"/>
          <t:FieldURI FieldURI="calendar:EndWallClock"/>
        </t:AdditionalProperties>
      </m:ItemShape>
      <m:IndexedPageItemView Offset="0"/>
      <m:ParentFolderIds>
        <t:FolderId Id="AQEuAAADGkRzkKpmEc2byACqAC/EWgMAouZN+j474U2fhmokbCNCbwADGTqv/AAAAA=="/>
      </m:ParentFolderIds>
    </m:FindItem>
  </s:Body>
</s:Envelope>

Response...

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1143" MinorBuildNumber="18" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  </s:Header>
  <s:Body>
    <m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
      <m:ResponseMessages>
        <m:FindItemResponseMessage ResponseClass="Error">
          <m:MessageText>The specified object was not found in the store., Item not found.</m:MessageText>
          <m:ResponseCode>ErrorItemNotFound</m:ResponseCode>
          <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>
        </m:FindItemResponseMessage>
      </m:ResponseMessages>
    </m:FindItemResponse>
  </s:Body>
</s:Envelope>

The error just isn't true, the folder ID is perfectly fine and there are those items to find within it.

You said a bug fix was being applied worldwide but given no way to track this :(. I've opened a ticket (number 11536035) with the 365 support team but got nothing back - probably because they're confused on what on earth this Github issue is about (as I linked to it).

If you have an alternate way of doing this request (an XML example like above would be useful - as this is a bash script using curl, yes BASH :P) that'd be handy in the meanwhile. I've looked at the workarounds supplied but I can't see how they'd translate to what would actually be sent XML wise.

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 26, 2018

Contributor

The error is a different issue. The previous error was "Expected an item Id but received a folder Id". This one is saying that it cant find something in the store. Can you give me a request id, X-BEHeader and request Date/time from a repro? These come from the response HTTP headers.

Out of curiosity, what happens if you call GetFolder on that folder? Do you get folder information back or the item not found again? And then, what if you remove the additional properties from the FindItem request - does that work, or same deal?

As an aside, you are missing your BaseShape element in your request.

<ItemShape>
   **<t:BaseShape>IdOnly</t:BaseShape>**
   <t:AdditionalProperties> ...
   </t:AdditionalProperties>
</ItemShape>

It works because BaseShape happens to have a defult value of IdOnly which maybe you are taking advantage of. I doubt we will change that, so you are probably ok there.

Contributor

davster commented Sep 26, 2018

The error is a different issue. The previous error was "Expected an item Id but received a folder Id". This one is saying that it cant find something in the store. Can you give me a request id, X-BEHeader and request Date/time from a repro? These come from the response HTTP headers.

Out of curiosity, what happens if you call GetFolder on that folder? Do you get folder information back or the item not found again? And then, what if you remove the additional properties from the FindItem request - does that work, or same deal?

As an aside, you are missing your BaseShape element in your request.

<ItemShape>
   **<t:BaseShape>IdOnly</t:BaseShape>**
   <t:AdditionalProperties> ...
   </t:AdditionalProperties>
</ItemShape>

It works because BaseShape happens to have a defult value of IdOnly which maybe you are taking advantage of. I doubt we will change that, so you are probably ok there.

@Lantizia

This comment has been minimized.

Show comment
Hide comment
@Lantizia

Lantizia Sep 26, 2018

If I follow you correctly, you are after the below?

curl -v -u <REDACTED USER@DOMAIN.COM USERNAME>:<REDACTED PASS> https://outlook.office365.com/EWS/Exchange.asmx -d '<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <s:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1"/>
  </s:Header>
  <s:Body>
    <m:FindItem>
      <m:ItemShape>
        <t:AdditionalProperties>
          <t:FieldURI FieldURI="item:Subject"/>
          <t:FieldURI FieldURI="calendar:IsAllDayEvent"/>
          <t:FieldURI FieldURI="calendar:StartWallClock"/>
          <t:FieldURI FieldURI="calendar:EndWallClock"/>
        </t:AdditionalProperties>
      </m:ItemShape>
      <m:IndexedPageItemView Offset="0"/>
      <m:ParentFolderIds>
        <t:FolderId Id="AQEuAAADGkRzkKpmEc2byACqAC/EWgMAouZN+j474U2fhmokbCNCbwADGTqv/AAAAA=="/>
      </m:ParentFolderIds>
    </m:FindItem>
  </s:Body>
</s:Envelope>'
*   Trying 52.97.146.178...
* Connected to outlook.office365.com (52.97.146.178) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* 	 server certificate verification OK
* 	 server certificate status verification SKIPPED
* 	 common name: outlook.com (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: RSA
* 	 certificate version: #3
* 	 subject: C=US,ST=Washington,L=Redmond,O=Microsoft Corporation,CN=outlook.com
* 	 start date: Wed, 01 Aug 2018 00:00:00 GMT
* 	 expire date: Sat, 01 Aug 2020 12:00:00 GMT
* 	 issuer: C=US,O=DigiCert Inc,CN=DigiCert Cloud Services CA-1
* 	 compression: NULL
* ALPN, server did not agree to a protocol
* Server auth using Basic with user '<REDACTED USER@DOMAIN.COM USERNAME>'
> POST /EWS/Exchange.asmx HTTP/1.1
> Host: outlook.office365.com
> Authorization: Basic <REDACTED HASH LIKELY THE PASSWORD IN SOME FORM>
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 919
> Content-Type: application/x-www-form-urlencoded
> 
* upload completely sent off: 919 out of 919 bytes
< HTTP/1.1 200 OK
< Cache-Control: private
< Transfer-Encoding: chunked
< Content-Type: text/xml; charset=utf-8
< Server: Microsoft-IIS/10.0
< request-id: 8c62bba8-43d8-4204-8d04-164bc0cb0ec1
< X-CalculatedFETarget: DB7PR08CU001.internal.outlook.com
< X-BackEndHttpStatus: 200
< Set-Cookie: exchangecookie=559e69f5f14f4e0da0600508efd02ed7; expires=Thu, 26-Sep-2019 15:43:37 GMT; path=/; HttpOnly
< X-FEProxyInfo: DB7PR08CA0023.EURPRD08.PROD.OUTLOOK.COM
< X-CalculatedBETarget: DB7PR04MB4187.eurprd04.prod.outlook.com
< X-BackEndHttpStatus: 200
< X-RUM-Validated: 1
< x-EwsHandler: FindItem
< X-AspNet-Version: 4.0.30319
< X-BeSku: WCS5
< X-DiagInfo: DB7PR04MB4187
< X-BEServer: DB7PR04MB4187
< X-FEServer: DB7PR08CA0023
< X-Powered-By: ASP.NET
< X-FEServer: LO2P265CA0383
< Date: Wed, 26 Sep 2018 15:43:37 GMT
< 
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1143" MinorBuildNumber="18" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:FindItemResponseMessage ResponseClass="Error"><m:MessageText>The specified object was not found in the store., Item not found.</m:MessageText><m:ResponseCode>ErrorItemNotFound</m:ResponseCode><m:DescriptiveLinkKey>0</m:DescriptiveLinkKey></m:FindItemResponseMessage></m:ResponseMessages></m:FindItemResponse></s:Body></s:Envelope>

Lantizia commented Sep 26, 2018

If I follow you correctly, you are after the below?

curl -v -u <REDACTED USER@DOMAIN.COM USERNAME>:<REDACTED PASS> https://outlook.office365.com/EWS/Exchange.asmx -d '<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
  <s:Header>
    <t:RequestServerVersion Version="Exchange2013_SP1"/>
  </s:Header>
  <s:Body>
    <m:FindItem>
      <m:ItemShape>
        <t:AdditionalProperties>
          <t:FieldURI FieldURI="item:Subject"/>
          <t:FieldURI FieldURI="calendar:IsAllDayEvent"/>
          <t:FieldURI FieldURI="calendar:StartWallClock"/>
          <t:FieldURI FieldURI="calendar:EndWallClock"/>
        </t:AdditionalProperties>
      </m:ItemShape>
      <m:IndexedPageItemView Offset="0"/>
      <m:ParentFolderIds>
        <t:FolderId Id="AQEuAAADGkRzkKpmEc2byACqAC/EWgMAouZN+j474U2fhmokbCNCbwADGTqv/AAAAA=="/>
      </m:ParentFolderIds>
    </m:FindItem>
  </s:Body>
</s:Envelope>'
*   Trying 52.97.146.178...
* Connected to outlook.office365.com (52.97.146.178) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* 	 server certificate verification OK
* 	 server certificate status verification SKIPPED
* 	 common name: outlook.com (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: RSA
* 	 certificate version: #3
* 	 subject: C=US,ST=Washington,L=Redmond,O=Microsoft Corporation,CN=outlook.com
* 	 start date: Wed, 01 Aug 2018 00:00:00 GMT
* 	 expire date: Sat, 01 Aug 2020 12:00:00 GMT
* 	 issuer: C=US,O=DigiCert Inc,CN=DigiCert Cloud Services CA-1
* 	 compression: NULL
* ALPN, server did not agree to a protocol
* Server auth using Basic with user '<REDACTED USER@DOMAIN.COM USERNAME>'
> POST /EWS/Exchange.asmx HTTP/1.1
> Host: outlook.office365.com
> Authorization: Basic <REDACTED HASH LIKELY THE PASSWORD IN SOME FORM>
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 919
> Content-Type: application/x-www-form-urlencoded
> 
* upload completely sent off: 919 out of 919 bytes
< HTTP/1.1 200 OK
< Cache-Control: private
< Transfer-Encoding: chunked
< Content-Type: text/xml; charset=utf-8
< Server: Microsoft-IIS/10.0
< request-id: 8c62bba8-43d8-4204-8d04-164bc0cb0ec1
< X-CalculatedFETarget: DB7PR08CU001.internal.outlook.com
< X-BackEndHttpStatus: 200
< Set-Cookie: exchangecookie=559e69f5f14f4e0da0600508efd02ed7; expires=Thu, 26-Sep-2019 15:43:37 GMT; path=/; HttpOnly
< X-FEProxyInfo: DB7PR08CA0023.EURPRD08.PROD.OUTLOOK.COM
< X-CalculatedBETarget: DB7PR04MB4187.eurprd04.prod.outlook.com
< X-BackEndHttpStatus: 200
< X-RUM-Validated: 1
< x-EwsHandler: FindItem
< X-AspNet-Version: 4.0.30319
< X-BeSku: WCS5
< X-DiagInfo: DB7PR04MB4187
< X-BEServer: DB7PR04MB4187
< X-FEServer: DB7PR08CA0023
< X-Powered-By: ASP.NET
< X-FEServer: LO2P265CA0383
< Date: Wed, 26 Sep 2018 15:43:37 GMT
< 
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="15" MinorVersion="20" MajorBuildNumber="1143" MinorBuildNumber="18" Version="V2018_01_08" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:FindItemResponseMessage ResponseClass="Error"><m:MessageText>The specified object was not found in the store., Item not found.</m:MessageText><m:ResponseCode>ErrorItemNotFound</m:ResponseCode><m:DescriptiveLinkKey>0</m:DescriptiveLinkKey></m:FindItemResponseMessage></m:ResponseMessages></m:FindItemResponse></s:Body></s:Envelope>

@Lantizia

This comment has been minimized.

Show comment
Hide comment
@Lantizia

Lantizia Sep 26, 2018

What I will add is this. The issue we are having (albeit admittedly we're just using a straight XML file with curl)... occurred on exactly the same day as this other problem and the same XML was working fine before that and returning results.

Noticed a few more people talking about it over here too...

https://social.technet.microsoft.com/Forums/en-US/7d800bef-48c8-42ad-a737-ece8aa16d683/exchangeonlineews-findappointments-method-on-public-folder-calendar-error-returns-folderid-not?forum=exchangesvrdevelopment

Lantizia commented Sep 26, 2018

What I will add is this. The issue we are having (albeit admittedly we're just using a straight XML file with curl)... occurred on exactly the same day as this other problem and the same XML was working fine before that and returning results.

Noticed a few more people talking about it over here too...

https://social.technet.microsoft.com/Forums/en-US/7d800bef-48c8-42ad-a737-ece8aa16d683/exchangeonlineews-findappointments-method-on-public-folder-calendar-error-returns-folderid-not?forum=exchangesvrdevelopment

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 26, 2018

Contributor

I pulled your logs for the above request, and it is complaining that it can't find the public folder (error should be folder not found, not item not found). I have looped in the PF feature team. In the meantime, try adding an X-AnchorMailbox header and set it to the smtp address of your public folder mailbox to see if that works.

Contributor

davster commented Sep 26, 2018

I pulled your logs for the above request, and it is complaining that it can't find the public folder (error should be folder not found, not item not found). I have looped in the PF feature team. In the meantime, try adding an X-AnchorMailbox header and set it to the smtp address of your public folder mailbox to see if that works.

@Lantizia

This comment has been minimized.

Show comment
Hide comment
@Lantizia

Lantizia Sep 26, 2018

Yeah that is one of the things I've already tried, didn't have any effect.

Lantizia commented Sep 26, 2018

Yeah that is one of the things I've already tried, didn't have any effect.

@frukeus

This comment has been minimized.

Show comment
Hide comment
@frukeus

frukeus Sep 28, 2018

Exception type: ServiceResponseException 
Exception message: The specified object was not found in the store., Can't connect to the mailbox of user Mailbox database guid: 41dafc9e-716d-4029-bf90-ef4dd62d4699 because the ExchangePrincipal object contains outdated information. The mailbox may have been moved recently.

Anyone experience this issue with the EWS API?

frukeus commented Sep 28, 2018

Exception type: ServiceResponseException 
Exception message: The specified object was not found in the store., Can't connect to the mailbox of user Mailbox database guid: 41dafc9e-716d-4029-bf90-ef4dd62d4699 because the ExchangePrincipal object contains outdated information. The mailbox may have been moved recently.

Anyone experience this issue with the EWS API?

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 28, 2018

Contributor

@frukeus - Could you provide the HTTP response headers for the failed request? I would like to confirm that it is the same issue as @Lantizia is seeing. I forwarded this to the public folders team to investigate as well. Actually, this one might be a bit different as the error message talks about the mailbox being inaccessible. Regardless, the response headers would help.

Contributor

davster commented Sep 28, 2018

@frukeus - Could you provide the HTTP response headers for the failed request? I would like to confirm that it is the same issue as @Lantizia is seeing. I forwarded this to the public folders team to investigate as well. Actually, this one might be a bit different as the error message talks about the mailbox being inaccessible. Regardless, the response headers would help.

@frukeus

This comment has been minimized.

Show comment
Hide comment
@frukeus

frukeus Sep 28, 2018

Transfer-Encoding chunked
Content-Encoding gzip
Vary Accept-Encoding
request-id 4bfc5e45-4398-4f49-9c97-0b54cf1f7cf4
X-CalculatedFETarget AM0PR01CU001.internal.outlook.com
X-BackEndHttpStatus 200,200
X-FEProxyInfo AM0PR01CA0006.EURPRD01.PROD.EXCHANGELABS.COM
X-CalculatedBETarget AM0P191MB0403.EURP191.PROD.OUTLOOK.COM
X-RUM-Validated 1
x-EwsHandler FindFolder
X-BeSku WCS5
X-DiagInfo AM0P191MB0403
X-BEServer AM0P191MB0403
X-FEServer AM0PR01CA0006,SG2PR0401CA0017
Cache-Control private
Content-Type text/xml; charset=utf-8
Date Fri, 28 Sep 2018 03:08:33 GMT
Set-Cookie exchangecookie=432be5b09af342359f679350229e778f; path=/
Server Microsoft-IIS/10.0
X-AspNet-Version 4.0.30319
X-Powered-By ASP.NET

That's all tt I could extract

frukeus commented Sep 28, 2018

Transfer-Encoding chunked
Content-Encoding gzip
Vary Accept-Encoding
request-id 4bfc5e45-4398-4f49-9c97-0b54cf1f7cf4
X-CalculatedFETarget AM0PR01CU001.internal.outlook.com
X-BackEndHttpStatus 200,200
X-FEProxyInfo AM0PR01CA0006.EURPRD01.PROD.EXCHANGELABS.COM
X-CalculatedBETarget AM0P191MB0403.EURP191.PROD.OUTLOOK.COM
X-RUM-Validated 1
x-EwsHandler FindFolder
X-BeSku WCS5
X-DiagInfo AM0P191MB0403
X-BEServer AM0P191MB0403
X-FEServer AM0PR01CA0006,SG2PR0401CA0017
Cache-Control private
Content-Type text/xml; charset=utf-8
Date Fri, 28 Sep 2018 03:08:33 GMT
Set-Cookie exchangecookie=432be5b09af342359f679350229e778f; path=/
Server Microsoft-IIS/10.0
X-AspNet-Version 4.0.30319
X-Powered-By ASP.NET

That's all tt I could extract

@davster

This comment has been minimized.

Show comment
Hide comment
@davster

davster Sep 28, 2018

Contributor

Per the PF team:

We set X-AnchorMailbox to handle cross-forest scenarios where

  1. User and PF mailboxes are in different forests
  2. PF mailboxes are spread across different forests

This tenant has only one PF mailbox and it is in Eurp192.
I see some of the user mailboxes in eurprd04, if the user trying to access the mailbox is in a different forest, ask them to include X-AnchorMailbox header.

Default public folder mailbox for the given user can be found as follows:
(Get-Mailbox ). EffectivePublicFolderMailbox

As the tenant has only 1 PF mailbox, it would be the default public folder mailbox for all the users.

Contributor

davster commented Sep 28, 2018

Per the PF team:

We set X-AnchorMailbox to handle cross-forest scenarios where

  1. User and PF mailboxes are in different forests
  2. PF mailboxes are spread across different forests

This tenant has only one PF mailbox and it is in Eurp192.
I see some of the user mailboxes in eurprd04, if the user trying to access the mailbox is in a different forest, ask them to include X-AnchorMailbox header.

Default public folder mailbox for the given user can be found as follows:
(Get-Mailbox ). EffectivePublicFolderMailbox

As the tenant has only 1 PF mailbox, it would be the default public folder mailbox for all the users.

@frukeus

This comment has been minimized.

Show comment
Hide comment
@frukeus

frukeus Oct 1, 2018

This issue seemed to have been resolved by itself over the weekend.
We didn't make any code changes yet everything is back working.

Per the PF team:

We set X-AnchorMailbox to handle cross-forest scenarios where

  1. User and PF mailboxes are in different forests
  2. PF mailboxes are spread across different forests

This tenant has only one PF mailbox and it is in Eurp192.
I see some of the user mailboxes in eurprd04, if the user trying to access the mailbox is in a different forest, ask them to include X-AnchorMailbox header.

Default public folder mailbox for the given user can be found as follows:
(Get-Mailbox ). EffectivePublicFolderMailbox

As the tenant has only 1 PF mailbox, it would be the default public folder mailbox for all the users.

frukeus commented Oct 1, 2018

This issue seemed to have been resolved by itself over the weekend.
We didn't make any code changes yet everything is back working.

Per the PF team:

We set X-AnchorMailbox to handle cross-forest scenarios where

  1. User and PF mailboxes are in different forests
  2. PF mailboxes are spread across different forests

This tenant has only one PF mailbox and it is in Eurp192.
I see some of the user mailboxes in eurprd04, if the user trying to access the mailbox is in a different forest, ask them to include X-AnchorMailbox header.

Default public folder mailbox for the given user can be found as follows:
(Get-Mailbox ). EffectivePublicFolderMailbox

As the tenant has only 1 PF mailbox, it would be the default public folder mailbox for all the users.

@Lantizia

This comment has been minimized.

Show comment
Hide comment
@Lantizia

Lantizia Oct 4, 2018

For the hell of it I thought I'd try an X-AnchorMailbox that is not my mailbox and it has worked!
e.g.
Username: lantizia@company.com
X-AnchorMailbox: support@company.com

Whereas I have been using...
e.g.
Username: lantizia@company.com
X-AnchorMailbox: lantizia@company.com

Now that I've got that working... I thought I'd try it again without the X-AnchorMailbox. BINGO, it works fine now.

It's as though making just that one request with X-AnchorMailbox has made it realise it needs to jiggle things about on the 365 servers and now it's not needed any more.

Very frustrating, especially for all these people in the forum link below who have been experiencing this for over a month (and I've yet to have any decent reply back from an open case with Microsoft for now 10 days on this)...

https://social.technet.microsoft.com/Forums/en-US/ee6e943f-e103-4abf-957f-19a42aa8a91b/ews-with-o365-has-been-broken-for-the-past-24-hours-for-us?forum=onlineservicesexchange

Lantizia commented Oct 4, 2018

For the hell of it I thought I'd try an X-AnchorMailbox that is not my mailbox and it has worked!
e.g.
Username: lantizia@company.com
X-AnchorMailbox: support@company.com

Whereas I have been using...
e.g.
Username: lantizia@company.com
X-AnchorMailbox: lantizia@company.com

Now that I've got that working... I thought I'd try it again without the X-AnchorMailbox. BINGO, it works fine now.

It's as though making just that one request with X-AnchorMailbox has made it realise it needs to jiggle things about on the 365 servers and now it's not needed any more.

Very frustrating, especially for all these people in the forum link below who have been experiencing this for over a month (and I've yet to have any decent reply back from an open case with Microsoft for now 10 days on this)...

https://social.technet.microsoft.com/Forums/en-US/ee6e943f-e103-4abf-957f-19a42aa8a91b/ews-with-o365-has-been-broken-for-the-past-24-hours-for-us?forum=onlineservicesexchange

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment