Today I’m gonna share with you a simple tip, which is used on SharePoint online. I just roaming on files today in SharePoint online site to check what are the files and resources are used by it.

There I have saw a service URL, which looks different and it returns the current user image without using any code. The below URL returns my profile image which I updated in Office 365,

To get the user image from Office 365, we have to pass the users’s email id with the service url.<User's work email account>&UA=0&size=HR<Size>

Query strings:
email, UA, size, sc

We can receive the image in different sizes, For me HR32x32 and HR64x64 worked.

If you provided the unsupported size in the url returns the below error message,

{"Body":{"ErrorCode":500,"ExceptionName":"ArgumentException","FaultMessage":"Requested value 'HR128x128' was not found.","IsTransient":false}}