0

I am integrating an application with the MS Graph API. The application will create Teams with files and folders, and also create events on users' calendars. Everything was working fine in our commercial Graph environment, but when we tried all the same requests against our US National Cloud environment (graph.microsoft.us) we ran into problems.

  1. Posting to /teams/{team id}/members returns a 404 every time. The request is formatted exactly like the example: https://learn.microsoft.com/en-us/graph/api/team-post-members?view=graph-rest-1.0&tabs=http

  2. Posting to me/events or /users/{userPrincipalName}/events returns a 400 every time. I even tried manually formatting the request exactly like the example with changed dates and addresses to no avail: https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http

I can post various other requests. For example: the app creates a Team, adds folders to the default channel, and modifies permissions on those folders before trying to execute the requests that fail.

I receive the errors using the v1.0 or beta versions of the API.

I'm not sure that it matters, but I'm using the WebClient class in .NET 4.7.2 with C#.

Failed Event Request:

POST https://graph.microsoft.us/beta/users/<my email>/calendar/events
{
  "subject": "Some - Meeting - Name",
  "body": {
    "contentType": "HTML",
    "content": ""
  },
  "start": {
    "dateTime": "2021-07-08T21:00:00",
    "timeZone": "UTC"
  },
  "end": {
    "dateTime": "2021-07-08T22:00:00",
    "timeZone": "UTC"
  },
  "location": {
    "displayName": "Virtual"
  },
  "attendees": [
    {
      "emailAddress": {
        "address": "<My email>",
        "name": "<My name>"
      },
      "type": "required"
    },
    {
      "emailAddress": {
        "address": "<colleague email>",
        "name": "<colleague name>"
      },
      "type": "required"
    }
  ],
  "allowNewTimeProposals": true,
  "isOnlineMeeting": true,
  "onlineMeetingProvider": "teamsForBusiness",
  "transactionId": "fa3b8eb3-02b0-435a-ab29-5019cab134eb"
}

Response

request-id: 51351ca3-9354-4eae-8d8c-d09f168594ab
client-request-id: 51351ca3-9354-4eae-8d8c-d09f168594ab
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"USGov Arizona","Slice":"SliceC","Ring":"4","ScaleUnit":"000","RoleInstance":"AGSFE_IN_0"}}
Strict-Transport-Security: max-age=31536000
Content-Length: 243
Cache-Control: private
Content-Type: application/json
Date: Thu, 08 Jul 2021 00:05:47 GMT
 
Body:
{
  "error": {
    "code": "UnableToDeserializePostBody",
    "message": "were unable to deserialize ",
    "innerError": {
      "date": "2021-07-08T00:05:48",
      "request-id": "51351ca3-9354-4eae-8d8c-d09f168594ab",
      "client-request-id": "51351ca3-9354-4eae-8d8c-d09f168594ab"
    }
  }
}

Failed Add Member Request

POST https://graph.microsoft.us/beta/teams/<team-id>/members
{
  "@odata.type": "#microsoft.graph.aadUserConversationMember",
  "roles": [],
  [email protected]: https://graph.microsoft.us/beta/users('<user guid>')
}

Response

{
  "error": {
    "code": "NotFound",
    "message": "Not Found",
    "innerError": {
      "date": "2021-07-08T00:35:13",
      "request-id": "b488d292-2733-4512-a759-507a3a58bdbb",
      "client-request-id": "b488d292-2733-4512-a759-507a3a58bdbb"
    }
  }
}
7
  • Could you please share the request and response along with the header for failed request? Please make sure you have removed an PII. Commented Jul 8, 2021 at 14:11
  • 1
    @Wajeed-MSFT - so it has been done
    – Ian
    Commented Jul 8, 2021 at 19:16
  • I have shared this issue with engineering team. I'll let you know once I have some updates. Commented Jul 14, 2021 at 17:57
  • @Wajeed-MSFT Any report back from engineering on this issue?
    – James Love
    Commented Sep 10, 2021 at 8:25
  • @JamesLove - Engineering team is working on it but we do not have the exact ETA to share as of now. Commented Sep 14, 2021 at 7:39

1 Answer 1

0

Update 11/15/2021

Adding Team members appears to be fixed. The fix, same with the bug, appears to have passed with no public documentation. I am unsure of the "allowNewTimeProposals" flag as we have simply left that out of our requests.

Original Post

  1. For the events request, using the "allowNewTimeProposals" property causes Graph to throw the "UnableToDeserializePostBody" error when using the US National Cloud. However, the worldwide endpoints work fine with this parameter. Answer from MS is that this will be fixed next quarter.

  2. The Add Team Member request is broken for the .us Graph endpoints and they're planning to fix it next quarter.

In other words. MS documentation is like a design proposal/marketing document designed to get you to buy and test their services for them.

2
  • Is there a reference somewhere from Microsoft on "Add Team Member request is broken from the .us Graph endpoints"?
    – James Love
    Commented Sep 3, 2021 at 12:10
  • 1
    No. My posts available on the internet have not been answered by MS personnel and the official documentation says all this should work. The info in this post came directly from MS support, and it took weeks for them just to tell me this. I'm guessing MS is intentionally not admitting this publicly.
    – Ian
    Commented Sep 4, 2021 at 0:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.