Forum Discussion
Row Level Security doesn't work with e-mail aliases
So I did a bit more testing on this with IT and it seems the legacy logins are not all the same. Some would filter my "Logged in user:" measure correctly however it would filter the records completely instead of having it unfiltered altogether.
I can't help but think that the simplest solution would be to build my RLS role filter in such a way that it looks for a match on either of two columns: Email and LegacyEmail (which I will create). So evey employee would have a standard e-mail and some would have a Legacy one.
My current filter is like this:
Here I filter my Project table where the ProjMgr (numeric for EmployeeID) matches the EmployeeID in my Employee table where the Email field matches the logged in user. Can anyone help me add some OR logic to this so that it looks for a LegacyEmail first and if doesn't find one, defaults to the Email field?
Thanks,
One other solution I would think of is in Power Query, where you know which of those 25 accounts are different to use a conditional column and where it is one of those accounts use the legacy email address or keep it as the current email address.
By doing it in this way you will not have to create a complex DAX measure to try and find the right value?
The right email addresses will all be in one column.
- KevinColes5 years ago
Helper III
Hi GilbertQ
I am already doing as you suggest... my data is coming from an ERP system and the users standardized (jdoe@) email is in there and I have set up a separate table of legacy users.....in my query I do a case statement whereby if a legacy e-mail exists, use it, otherwise use the e-mail.
This is not the issue because I have tried this both ways - passing the legacy e-mail and the standard version. The issue is in the Service because I have tried testing using View As some of the legacy users and I know they are using the legacy e-mail that matches what the Service is pulling. I think what is happening though is that on those users, their Primary Email address is jdoe@ even though the service autofills to joe@.
Any user with a Standard e-mail works.....legacy do not.
Thanks,
Kevin- GilbertQ5 years ago
Super User
I would then chat to IT to see what they can do to resolve the issue.
I would imagine that all the emails should be the same throughout the company?
And that would then solve your issue!- KevinColes5 years ago
Helper III
In a perfect world yes...but it's my client not my company so I can't really dictate. Also the users are accustomed to the format they have so I'm not sure the appetite is there to change it now.
Kevin