cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading Photo using Microsoft Graph API

bjadav
New Contributor II

I am trying to upload photo on O365 using Graph API. As per this document, I have to upload file as binary attachment and using Postman, I am able to update the photo.
But in SnapLogic Rest Patch Snap, it is not working as intended. I have photo stored in SnapLogic project space as .jpeg file.
image

Please let me know how can I use binary file with Rest Patch Snap.

2 REPLIES 2

robin
Former Employee

@bjadav Unfortunately this is a gap for us with the REST PATCH and PUT Snaps.

The REST POST Snap can do this with a HTTP Header Content-Type: image/jpeg, The “Single file upload: File” setting referencing your SLDB File, an “Upload transfer request type” value of Calculate content length and finally the “Upload body type” set to Binary.

image

However, as the endpoint in question only accepts PUT and PATCH methods to change user photos, the POST Snap can’t be used here.

I’ll investigate what it will take us to broaden this support to the other Snaps.

eirez
New Contributor

I would appreciate an update if the REST PATCH snap will be updated soon.
We can’t send file attachments to iCIMS for a similar reason. Only REST Patch is allowed and we need to use content-length and binary.

Do you think the REST Patch snap will have the same features as REST Post soon?