Open scastillo-jp opened 4 years ago
We encountered that for the HTTP method PATCH to work, we need to add headers explicitly, e.g.:
headers = {
'Content-type': 'application/json',
'Accept': 'application/json',
}
endpoint = "{endpoint}/users/{user_id}?api-version=1.6".format(
endpoint=self.config.ENDPOINT, user_id=id
)
data = {'extension_1d76efa96f604499acc0c0ee116a1453_role': role}
response = requests.patch(
endpoint,
auth=BearerAuth(self.access_token),
data=json.dumps(data),
headers=headers,
)
make a user an administrator, is necessary create a new end point for this feature.