Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

Remove user photo for Azure AD User

I have a requirement to remove the user photo from Azure AD User profile.

I checked for MS Graph APIs for User Photos. But as far as I know, MS Graph APIs are only available to add/upload photo. There is no such API available to remove the photo. Reference link: https://docs.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-1.0&tabs=http

For theAS a workaround, I found few articles on internet, where they said to upload default avatar image instead. But by uploading default avatar image, it will not give that default look and feel of initial letters in user image that we get when there is not actually no image available in the profile. Please see the below image for reference: enter image description here

I found one PowerShell cmdlet to remove the user photo. Reference link: https://docs.microsoft.com/en-us/powershell/module/exchange/remove-userphoto?view=exchange-ps

Remove-UserPhoto "Ann Beebe"

But this cmdlet, only worked for the first time. For the first time itIt removed the image. But on the first run, but when I setuplodaded a new image in the user's profile and runexecuted this cmdlet, it didn't workedwork. Same happened I examined the same behaviour for multiple other usersuser accounts.

My Question:

Is there any way to remove the users photo from Azure AD user profile programmatically and it will display its default firstname-lastname initials in the image portion?

Remove user photo for Azure AD User

I have a requirement to remove the user photo from Azure AD User profile.

I checked for MS Graph APIs for User Photos. But as far as I know, MS Graph APIs are only available to add/upload photo. There is no such API available to remove the photo. Reference link: https://docs.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-1.0&tabs=http

For the workaround, I found few articles on internet, where they said to upload default avatar image instead. But by uploading default avatar image, it will not give that default look and feel of initial letters in user image that we get when there is not actually no image available in the profile. Please see the below image for reference: enter image description here

I found one PowerShell cmdlet to remove the user photo. Reference link: https://docs.microsoft.com/en-us/powershell/module/exchange/remove-userphoto?view=exchange-ps

Remove-UserPhoto "Ann Beebe"

But this cmdlet, only worked for the first time. For the first time it removed the image. But when I set new image in profile and run this cmdlet, it didn't worked. Same happened for other users.

My Question:

Is there any way to remove the users photo from Azure AD user profile programmatically and it will display its default firstname-lastname initials in the image portion?

Remove user photo for User

I have a requirement to remove the user photo from Azure AD User profile.

I checked for MS Graph APIs for User Photos. But as far as I know, MS Graph APIs are only available to add/upload photo. There is no such API available to remove the photo. Reference link: https://docs.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-1.0&tabs=http

AS a workaround, I found few articles on internet, where they said to upload default avatar image instead. But by uploading default avatar image, it will not give that default look and feel of initial letters in user image that we get when there is not actually no image available in the profile. Please see the below image for reference: enter image description here

I found one PowerShell cmdlet to remove the user photo. Reference link: https://docs.microsoft.com/en-us/powershell/module/exchange/remove-userphoto?view=exchange-ps

Remove-UserPhoto "Ann Beebe"

But this cmdlet, only worked for the first time. It removed the image on the first run, but when I uplodaded a new image in the user's profile and executed this cmdlet, it didn't work. I examined the same behaviour for multiple other user accounts.

My Question:

Is there any way to remove the users photo from Azure AD user profile programmatically and it will display its default firstname-lastname initials in the image portion?

Source Link
Dikesh Gandhi
  • 7.2k
  • 4
  • 31
  • 58

Remove user photo for Azure AD User

I have a requirement to remove the user photo from Azure AD User profile.

I checked for MS Graph APIs for User Photos. But as far as I know, MS Graph APIs are only available to add/upload photo. There is no such API available to remove the photo. Reference link: https://docs.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-1.0&tabs=http

For the workaround, I found few articles on internet, where they said to upload default avatar image instead. But by uploading default avatar image, it will not give that default look and feel of initial letters in user image that we get when there is not actually no image available in the profile. Please see the below image for reference: enter image description here

I found one PowerShell cmdlet to remove the user photo. Reference link: https://docs.microsoft.com/en-us/powershell/module/exchange/remove-userphoto?view=exchange-ps

Remove-UserPhoto "Ann Beebe"

But this cmdlet, only worked for the first time. For the first time it removed the image. But when I set new image in profile and run this cmdlet, it didn't worked. Same happened for other users.

My Question:

Is there any way to remove the users photo from Azure AD user profile programmatically and it will display its default firstname-lastname initials in the image portion?