'Facebook Workplace Account Management API - Update user

I have a workplace application,
I wish to change emailIds of the user via API,
I found that Account Management API can be used to modify user details via API calls.

My use-case is to modify user email via the Account Management API, which comes under urn:scim:schemas:core:1.0 schema extension,
I wish to overwrite the existing email with the one I would specify in the requestBody,
From the documentation, I've come up with the following request -

Url endpoint -
https://someCompanyName.facebook.com/scim/v1/Users/ HTTP/1.1

Method type -
POST

Request body-

{
    "schemas": [
        "urn:scim:schemas:core:1.0",
        "urn:scim:schemas:extension:facebook:auth_method:1.0"
    ],
    "userName": "abc",
    "name": {
        "formatted": "Julius Caesar"
    },
    "emails": ["[email protected]"],
    "urn:scim:schemas:extension:facebook:auth_method:1.0": {
        "auth_method": "password"
    }
}

Is it correct? What modifications do I need to make to the request?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source