DAX expression used to be:
[Email] = USERPRINCIPALNAME() || [Manageremail] = USERPRINCIPALNAME()
Due to the company's changed name, @xy has changed to @zw. People still log in with the xy, however in db there is zw. That is the reason why security is not working anymore - mails are not matching.
My idea was to crop out the name before @, but I could not manage to write the correct DAX in Manage Roles.
This is one of the examples. It's giving me a syntax error. I have run out of ideas and am not sure is it even possible to do so in Manage roles options.
Is_Match =
VAR UserName = LEFT(USERPRINCIPALNAME(), SEARCH("@", USERPRINCIPALNAME()) - 1)
VAR EmailName = LEFT([Email], SEARCH("@", [Email]) - 1)
VAR ManagerName = LEFT([Manageremail], SEARCH("@", [Manageremail]) - 1)
RETURN IF(UserName = EmailName || UserName = ManagerName, 1, 0)