Reputation: 3247
I am using the microsoft graph node.js sdk, making an app-only request to PUT to /users/f580eac0-9ece-413a-a26f-7964df1f2025/photo/$value
, and I get the following:
{ statusCode: 500,
code: 'ErrorInternalServerError',
message: 'Value cannot be null.\r\nParameter name: userPrincipalName',
requestId: 'a5f0429d-ad3f-4f83-9e50-f540e5c8f9b8',
date: 2017-07-20T23:17:17.000Z,
body:
{ code: 'ErrorInternalServerError',
message: 'Value cannot be null.\r\nParameter name: userPrincipalName',
innerError:
{ 'request-id': 'a5f0429d-ad3f-4f83-9e50-f540e5c8f9b8',
date: '2017-07-20T23:17:17' } } }
How can I clear the photo for this user?
Upvotes: 0
Views: 143
Reputation: 5838
Unfortunately deleting a photo (or setting to null) is not supported currently. This is something that is being worked on, but I don't have a clear ETA and it may be some time before it's available.
The only (nasty) workaround I'm aware of is to PUT a 1x1 transparent photo.
Hope this helps,
Upvotes: 1