Home

Getting a user's photo correctly in SharePoint Online

%3CLINGO-SUB%20id%3D%22lingo-sub-94471%22%20slang%3D%22en-US%22%3EGetting%20a%20user's%20photo%20correctly%20in%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-94471%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20a%20client-side%20solution%2C%20we%20often%20like%20to%20use%20our%20users%20photos%20in%20rollups%2C%20search%20results%20etc.%20and%20we%20were%20used%20to%20use%20this%20endpoint%3A%3C%2FP%3E%3CP%3E%2F_layouts%2F15%2Fuserphoto.aspx%3Fsize%3DM%26amp%3Baccountname%3D%3CACCOUNTNAME%3E%3C%2FACCOUNTNAME%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20requires%20the%20user%20to%20have%20a%20photo%20in%20their%20User%20Profile%20-%20and%20it%20works%20like%20a%20charm.%20But%20after%20Delve%20arrived%2C%20we%20also%20have%20this%20new%20endpoint%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%2F_vti_bin%2FDelveApi.ashx%2Fpeople%2Fprofileimage%3FuserId%3D%3CUSERNAME%3E%3C%2FUSERNAME%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOur%20tests%20shows%20us%2C%20that%20even%20though%20the%20user%20has%20a%20picture%20in%20Delve%2C%20that%20last%20endpoint%20just%20shows%20a%20silhuet%20(eg.%20no%20available%20picture)%20for%20some%20users%20-%20not%20all.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOur%20customer%20uses%20Delve%20and%20most%20of%20the%20users%20has%20a%20picture%20in%20Delve%20and%20not%20nessecary%20in%20the%20User%20Profile%20store%20as%20well.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20have%20any%20experience%20and%2For%20advice%20when%20using%20the%20DelveApi.ashx%20endpoint%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-94471%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDelve%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-143923%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20a%20user's%20photo%20correctly%20in%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-143923%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20encounter%20the%20exact%20same%20problem%2C%20building%20an%20overview%20page%20with%20profile%20pictures%20of%20people.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUsing%20the%20DelveApi.ashx%20we%20get%20the%20placeholder%20image%20for%26nbsp%3Bmost%20of%20the%20other%20users.%20Some%20are%20shown.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUsing%20the%20following%20Delve%20URL%20directly%2C%20we%20get%20a%20401%20when%20we%20are%20not%20logged%20in%20into%20Delve%20already%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Feur.delve.office.com%2Fmt%2Fv3%2Fpeople%2Fprofileimage%3FuserId%3Duser%40domain.nl%26amp%3BUA%3D0%26amp%3Bsize%3DL%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Feur.delve.office.com%2Fmt%2Fv3%2Fpeople%2Fprofileimage%3FuserId%3Duser%40domain.nl%26amp%3BUA%3D0%26amp%3Bsize%3DL%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EWhen%20we%20are%20logged%20in%2C%20in%20Delve%2C%20we%20see%20all%20their%20images.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAny%20thoughts%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

In a client-side solution, we often like to use our users photos in rollups, search results etc. and we were used to use this endpoint:

/_layouts/15/userphoto.aspx?size=M&accountname=<accountName>

 

This requires the user to have a photo in their User Profile - and it works like a charm. But after Delve arrived, we also have this new endpoint: 

/_vti_bin/DelveApi.ashx/people/profileimage?userId=<username/email>

 

Our tests shows us, that even though the user has a picture in Delve, that last endpoint just shows a silhuet (eg. no available picture) for some users - not all.

 

Our customer uses Delve and most of the users has a picture in Delve and not nessecary in the User Profile store as well. 

 

Does anyone have any experience and/or advice when using the DelveApi.ashx endpoint?

1 Reply
Highlighted

We encounter the exact same problem, building an overview page with profile pictures of people. 

 

Using the DelveApi.ashx we get the placeholder image for most of the other users. Some are shown.

 

Using the following Delve URL directly, we get a 401 when we are not logged in into Delve already:

https://eur.delve.office.com/mt/v3/people/profileimage?userId=user@domain.nl&UA=0&size=L

When we are logged in, in Delve, we see all their images.

 

Any thoughts?

Related Conversations
MS Project - Impression GANTT + Ressources
Emmanuel57570 in Project on
0 Replies
Working with excel in Sharepoint desktop app
IanH1 in SharePoint on
2 Replies
Can't open different sections in OneNote Online
Simon_L in OneNote on
0 Replies
Project for the Web - weekends
Leigh Wood in Project on
0 Replies