0
votes

Microsoft Graph API is yet to provide full support for dealing with Organizational Contacts under Office 365.
The beta version of the Microsoft Graph API supports some limited edit/update operations,
as per the following page in the reference documentation:
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/orgcontact_update

But using the same to update the surname (it is in the list of supported fields) field for a test orgContact, we are getting the following error in the JSON response in Microsoft Graph Explorer:

Unable to update the specified properties for objects that have originated within an external service.

This was the request I used in Microsoft Graph Explorer:

Request Query:
PATCH  https://graph.microsoft.com/beta/contacts/fe851502-c15a-476b-bc68-bd2842721fb6

Request Body:
{
    "surname": "TESTSURNAME"
}

And this is the full response:

{
    "error": {
        "code": "Request_BadRequest",
        "message": "Unable to update the specified properties for objects that have originated within an external service.",
        "innerError": {
            "request-id": "608a620d-8911-4425-b70c-6e1fbdec59dc",
            "date": "2018-04-03T12:52:25"
        }
    }
}
  1. What could I be doing wrong?
  2. What does it mean by originated within an external service?
  3. Or if this a bug in the API, how do we report this / get this fixed?
1

1 Answers

0
votes

I played with this quite a bit now and I don't believe you're doing anything wrong - it's just that updating these fields isn't supported for now. Looking at the error message, it appears there were several issues through MS Graph's lifetime, particularly when it came to users and groups (see this for example: New User.employeeId ExtensionProperty not working)

So my bet is that for Org contacts, the Graph API 'thinks' these properties are owned by Exchange Online.

Btw. I actually tried patching a few other properties, too; none of it worked out. I'm getting the same error you get for: businessPhones, city, country, department, displayName, givenname, surname, jobtitle, mobilePhone - so pretty much all of it except for companyName and mail where I get a read only error ("Property ... is read-only and cannot be set. ").

I guess the question is whether MSFT is planning to allow updating org contacts in the future - and if so, when. My understanding is that you can request something to be added to the Graph API here: https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/category/101632-microsoft-graph-o365-rest-apis