Account Creation Success but Attribute Update Failure in AD: "The attribute syntax specified to the directory service is invalid"

pls check some threads

Provisioning Active directory account (Account Creation) using a rule - IdentityIQ (IIQ) / IIQ Discussion and Questions - SailPoint Developer Community

also why sn and givenname commented in your code. have you checked when enable it ?

Are you check IQservice logs? It would be possible provide these logs?