Forum Discussion
How to retrieve userprincipalname in Power query editor
- 1 year ago
Hi Harineeeeeeee ,
Thanking for reaching out to fabric community forum.
nilendraFabric Thanks for your prompt response. In additon to that :- You need to retrieve the User Principal Name (UPN) from Active Directory and map it to its corresponding StoreID. This mapping should be stored in a security table within your database. Ensure that this table is updated regularly to keep all user-store associations current.
- Once the data is stored in the security table, you can load it into Power Query for transformations, making it easier to query and analyze the data through a user-friendly interface.
- Next, create a function that retrieves the StoreID based on the provided User Principal Name as a parameter (@parameter). Use this parameter to filter your SQL query.
- However this function would need to be invoked from power query every time you need to query a user.
If our response or a community member’s response addressed your query, please mark it as 'Accept Answer' and click 'Yes' if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!
Thanks for reply but unfortunately this doesn't serve my purpose so I have to take the selected user that is userprincipalname and select the store id once I found my store id i ll remove the filters on userprincipalname and based on the found store id i will have to show all the users nilendraFabric
Makes sense. But M language doesn't have userprincipalname concept.