Need help in create AD Object in Flow Designer

Admin7267
Kilo Sage

I was trying to add AccountExpirationDate to the AD Object in the Flow Designer.

Admin7267_0-1755237382564.png

 


I'm trying to add date and time field to the existing Object details, but getting error in the flow as 
Invalid Type or unsupported attribute found in Object Data. If I removed the AccountExpirationDate then it is working fine.

 

What is the issue and how this can be fixed?

3 REPLIES 3

Bhuvan
Kilo Patron

@Admin7267 

 

Check whether cmdlet is correct, I believe it is 'Set-ADAccountExpiration'

 

https://learn.microsoft.com/en-us/powershell/module/activedirectory/set-adaccountexpiration?view=win...

 

Thanks,

Bhuvan

Viraj Hudlikar
Giga Sage

Hello @Admin7267 

The AccountExpirationDate value is in an invalid format for Active Directory. You need to convert the date and time data pill to a string format that AD accepts, such as a timestamp or an ISO 8601 string. Use a Script step or a subflow with a script action to format the date correctly before passing it to the AD action.

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

Sharique Azim
Kilo Sage

One possible reason could also be how AD accepts this object value. Format is one thing, but,  there could be policies to overwrite the value or set a default value or restricts setting during creation . How about updating after creating the AD object 5 mins(confirm the buffer time) with the expiration time.