0 votes

I'm looking at this onliner Set-AdmUser -Identity $DN -Replace @{AADPHoto = $photoBytes} -AdaxesService localhost -Server. I get an illegal operation error. Wondering what I am getting wrong maybe the attribute?

image.png

Trying to set up automation to set the photo in AD and Azure at the same time to avoid waiting for synchronization.

by (1.0k points)

1 Answer

0 votes
by (277k points)

Hello,

Have a look at the folowing script from our repository: https://www.adaxes.com/script-repository/upload-user-photo-to-office-365-s327.htm. However, there is currently no stable approach exiting. The Set-MgUserPhotoContent cmdlet can give errors without any actual reason.

0

I'm trying to avoid automation that requires running a script on 7,000 users each day when there is only 5 or 6 new pictures each day. So the script is self contained and doesn't run in a user's context. How do I target the user's azure identity or bind to it so this script you suggested will run correctly. We can user the version at the top of the article you sent where we use the AD thumbnail picture as the rest of my script will set that first.

0

Hello,

Sorry for the confusion, but we are not sure what exactly you mean. The scripts run for the target user and update both the on-premises and the Microsoft 365 photo. As a solution, you can create a custom command configured for the User object type and manually execute it for the users you need.

0

I don't understand why I would create a custom command and then script the execution of that command when we could simply bind to the target object. I'll figure this out and show you I guess.

Related questions

0 votes
1 answer

Hello, I'm trying to create a business rule that will update a user account expiry date when that user logs in for the first time. I'm new to Adaxes, so I don't have a ... updated by a user's action, such as "Last Logon". Is it possible to make this work?

asked Mar 6 by sjjb2024 (60 points)
0 votes
1 answer

Is there a way to have the Create User trigger to run a command to trigger the update user flag/trigger to be hit? The goal is to have specific Create User tasks to also go through the same tasks as the Update user.

asked Mar 2, 2023 by mobosys (290 points)
0 votes
1 answer

For example, if the scope is a specified OU, running the report will list management history for every object in the OU even if it has had no management operations ... so objects that have not had any recent modifications are excluded from the report results?

asked Aug 13, 2021 by ryan741 (120 points)
0 votes
1 answer

I would like users to use Adaxes to add themselves or others to a group, but instead of it just working, it has to go thru an approval process and be approved by the group owner before they are added. Thanks!

asked Jun 30, 2021 by RayBilyk (230 points)
0 votes
1 answer

At user creation, when the inbox is created, I'd like to be able to format the address as firstname.lastname@domain.com for some users. Other users firstnameintial.lastname@domain.com, is this possible? Envornment is hybrid O365. Thanks!

asked Jan 4 by cewilson (140 points)
3,411 questions
3,108 answers
7,912 comments
545,830 users