How to modify account request attributes in connector execution rule

Hi @RAKGDS ,
Below is the code that we are using to update the attributes, and we are calling external APIS to get the secureID

foreach ($attribute in $requestObject.AttributeRequests) {
             if($attribute.name -eq "sAMAccountName"){
             $attribute.value= "$($***********)";
             }
            
             if($attribute.name -eq "userPrincipalName"){
             $attribute.value= "$($*******)@corpitsvcs.com";
             }

Also, I have followed the default thing that is mentioned below