0
votes

I am using https://msdn.microsoft.com/en-us/office/office365/api/notify-rest-operations to get notifications for received emails.

The code to create new subscriptions or to renew existing ones was working fine until Oct. 17th.

Since Oct. 17th, I am receiving the below error message (with unchanged code):

Response.StatusCode=ServiceUnavailable

Response.Content={"error":{"code":"ErrorServiceUnavailable","message":"Active Directory operation did not succeed. Try again later."}}

I didn't find anything similar while looking at the web. Has anyone experienced the same behavior?

Edits:

  • I'm seeing this for a single user
  • Request headers:

POST /api/v2.0/me/subscriptions HTTP/1.1
Connection: Keep-Alive
Content-Type: application/json
Accept: application/json; odata.metadata=minimal
Accept-Encoding: gzip, deflate
Authorization: Bearer ....
X-AnchorMailbox: [email protected]
Content-Length: 242
Host: outlook.office.com
- Response headers:
HTTP/1.1 503 Service Unavailable
Cache-Control: private
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Server: Microsoft-IIS/8.5
Set-Cookie: exchangecookie=xxxxxxx; expires=Mon, 23-Oct-2017 11:16:04 GMT; path=/; HttpOnly
Set-Cookie: X-RouteRefreshCookie=xxxxxxx; expires=Sun, 23-Oct-2016 11:31:05 GMT; path=/
request-id: eb0f2b97-b49c-4ff2-af12-46217ab66d82
X-CalculatedBETarget: SN1PR01MB1821.prod.exchangelabs.com
X-BackEndHttpStatus: 503
OData-Version: 4.0
X-AspNet-Version: 4.0.30319
X-DiagInfo: SN1PR01MB1821
X-BEServer: SN1PR01MB1821
X-Powered-By: ASP.NET
X-FEServer: SN1PR02CA0019
X-MSEdge-Ref: Ref A: E6AE9E72C6AA489CA45CA7ABA49FF46B Ref B: AA0228753607999B7C8A8657FCE99268 Ref C: Sun Oct 23 04:16:05 2016 PST Date: Sun, 23 Oct 2016 11:16:04 GMT
Content-Length: 117

1
Please share the request and response headers.Yogesh
Are you seeing this for just one user in particular or alk users?Yogesh

1 Answers

1
votes

How sure are you that the address in x-anchormailbox is same as the user you are authenticating as? Try removing the x-anchormailbox and Exchange will route based on the logged in user and hopefully that will fix your issue.

In REST APIs, you almost never need to use x-anchormailbox since routing hints are gathered from either the url or Auth token.