The requirement is to capitalize first letter from firstname/lastname/displayname and rest of the letters to be in lowercase. If I understood it correctly?
Try this transform, there’s an embedded rule in all tenants called Cloud Services Deployment Utility that has some operations, one of them is normalizeName, and in this case you can add a couple of patterns you wish to correct from the normal transform. We used this transform for this exact “Macedo” situation and it turned out like this: { “name”: “NormalizeDisplayName”, “type”: “rule”, “attributes”: { “name”: “Cloud Services Deployment Utility”, “operation”: “normalizeName”, “delimiters”: [ " ", “-” ], “patterns”: “\b(Mac)”, “replacements”: { “\b(?:MacA)”: “Maca”, “\b(?:MacB)”: “Macb”, “\b(?:MacC)”: “Macc”, “\b(?:MacD)”: “Macd”, “\b(?:MacE)”: “Mace”, “\b(?:MacF)”: “Macf”, “\b(?:MacG)”: “Macg”, “\b(?:MacH)”: “Mach”, “\b(?:MacI)”: “Maci”, “\b(?:MacJ)”: “Macj”, “\b(?:MacK)”: “Mack”, “\b(?:MacL)”: “Macl”, “\b(?:MacM)”: “Macm”, “\b(?:MacN)”: “Macn”, “\b(?:MacO)”: “Maco”, “\b(?:MacP)”: “Macp”, “\b(?:MacQ)”: “Macq”, “\b(?:MacR)”: “Macr”, “\b(?:MacS)”: “Macs”, “\b(?:MacT)”: “Mact”, “\b(?:MacU)”: “Macu”, “\b(?:MacV)”: “Macv”, “\b(?:MacW)”: “Macw”, “\b(?:MacX)”: “Macx”, “\b(?:MacY)”: “Macy”, “\b(?:MacZ)”: “Macz” } }, “internal”: false }