Not applicable

Updating AD Attribute ThumbnailPhoto

I have a requirement to update AD attribute "thumbailPhoto" by picking images from a SharePoint library. My workflow runs on an AD Accounts list and updates all other attributes smoothly except thumbnailPhoto.

First, the Query List action doesn't work on libraries, though it displays libraries in lists drop-down. I created a list and manually added URLs to some of the images. I was able to extract information then, and display the image in the AD Accounts list. But the thumbnailPhoto attribute in AD is not updated whether I set it to the image's URL or the picture field itself.

Any help would be greatly appreciated.

Tags (2)
0 Kudos
Reply
15 Replies
Not applicable

Re: Updating AD Attribute ThumbnailPhoto

Please advise how were you able to display the image in AD Accounts list, I can't see Update AD user action having this option.

0 Kudos
Reply
Not applicable

Re: Updating AD Attribute ThumbnailPhoto

It's displayed in the Fields drop-down in Update AD user action. I think the AD team has the option to activate/allow it.

Prior to this, I've added a Query List action that extracts URLPath of the image and sets the Picture attribute of the AD Accounts list.

0 Kudos
Reply
Not applicable

Re: Updating AD Attribute ThumbnailPhoto

In "Update AD user" action under "Field" chose Other and put thumbnailPhoto, this will update that user property thumbnailPhoto to whatever has been specified. You can use ADSIEdit tool on your domain controller to check that this user property has been updated. This has been checked on my VM and is working.

0 Kudos
Reply
Not applicable

Re: Updating AD Attribute ThumbnailPhoto

This is exactly what I'm doing but the attribute is not being updated.

The pictures I have are 167 KB, AD thumbnails need to be 10KB per this thread: thumbnail photos inAD. How did you go about compressing the fies?

Thanks!

0 Kudos
Reply
andrewg
Scout

Re: Updating AD Attribute ThumbnailPhoto

I think it said the limit was 100kb, and most picture editors can help with that. I like Paint.Net

0 Kudos
Reply
leahannrobertso

Re: Updating AD Attribute ThumbnailPhoto

Did you get this figured out?  I have a similar requirement.  My problem is the field type required for the thumbnailPhoto attribute.

0 Kudos
Reply
andrewg
Scout

Re: Updating AD Attribute ThumbnailPhoto

Yes, its simple to limit the picture size and any picture editor to meet the 100kb limit. But what was your type issue?

0 Kudos
Reply
leahannrobertso

Re: Updating AD Attribute ThumbnailPhoto

I can get the photo converted, that's no problem.  When I use the Update AD User action, I can add thumbnailPhoto as an attribute to update using "Other", but get an error no matter what value I use as the value for that attribute.  From this thread, it looks like Midhat from Nintex Support was able to update an AD user using this action.  I wondered what value/type was used.  I'd love to get this to work.

0 Kudos
Reply
andrewg
Scout

Re: Updating AD Attribute ThumbnailPhoto

I believe it is a byte array. If you use PowerShell you would do the following.

$userName = "MyUsername"

$filePath = "c:\temp\MyPic.jpg"

[byte[]]$img = Get-Content $filePath –encoding byte

Get-ADUser –filter {samaccountname –eq $userName} | Set-ADUser –replace @{thumbnailphoto=$img}

Reply