Hi,
I am trying your suggestions now but none work, this is I think caused by not decoding the base64 before trying to resize it.
So I will try to explain again:
We get a base64 encoded string from our HR side. We put this encoded string into a custom attribute that accepts the string.
Lets say for example this is the string that's given to us via the provisioning agent.
This string cannot be loaded as it isnt decoded yet.
Now what I can do manually in powershell is the following:
[System.Tex.Encoding]::ASCII.GetString([System.Convert]::FromBase64String('stringfromscreenshothere')
this will give me a new string derived from the original string. If
I then take that output and put it in for example "ThumbnailPhoto" I will have the picture in AD.
However I dont wanna do the powershell step manually for everyone, so thats what I am trying to achieve.. I hope its now more clear. :)
For more context if I use the following website: https://www.base64decode.org/
I can put in the string from our HR api into the first box; and then I can use the output (second box) and put that into 'thumbnailphoto' and I will have a image.
The error I am getting:
If I do the workflow manually it goes like this:
- Sync users; API puts the base64 encoded string into jpegPhoto (the only native AD attribute to accept it.)
- Then I take that string and put it into the decode website I mentioned.
- I put this string into the attribute photo.
- Then I can use the script (https://www.adaxes.com/script-repository/update-user-photo-in-ad-and-microsoft-365-from-binary-attribute-s616.htm) to make it suitable for "ThumbNailphoto" and in the end I have a working photo there.
In screenshot form:
I hope that makes it more clear. :) I would really love it if we could solve this issue.