permission get-userphoto for all user RRS feed

  • Question

  • Team,
    What is the permission for get-userphoto command let for getting all user photo , currently I am getting only my photo.
    BTW I am using below script
    get-mailbox | % {Get-UserPhoto $_.identity} | % {Set-Content -path "D:\export\$($_.Identity).jpg" -value $_.picturedata -Encoding byte}
    And also I want to know is there any way I can get it without any specific permission,
    because I can get user photo from below URL using my credential<email>&UA=0&size=HR64x64

    I might be wrong, just want to ask.

    Thanks Saravana Kumar C

    Friday, June 21, 2019 12:07 PM

All replies

  • "MailBox" does not have an "Identity" property. 

    Get-User | Get-UserPhoto | ...


    Get-Mailbox | Get-UserPhoto


    • Edited by jrv Friday, June 21, 2019 1:00 PM
    Friday, June 21, 2019 12:59 PM
  • Thanks for the response JRV.

    I believe it is working by taking the "name" values it return from get-mailbox as identity

    My issue is with not able to save other users photo (just my photo is getting saved)

    Am I missing any permission for my account in Office 365, in-order to access other user photo in office 365

    Thanks Saravana Kumar C

    Friday, June 21, 2019 2:15 PM
  • There is no "name" value on a mailbox.


    Friday, June 21, 2019 2:28 PM