🔵 Solution 1: Power Apps + SharePoint List (Direct Lookup)
🔵 Solution 1: Power Apps + SharePoint List (Direct Lookup) 🟩 Step 1: Create a SharePoint List List Name: UserRoles Columns: Email (Single line of text) Role (Choice or Single line of text: Owner, Member, Viewer) 🔸 Example Data: Email Role admin@yourdomain.com Owner user1@yourdomain.com Member viewer@yourdomain.com Viewer 🟠Step 2: Connect SharePoint to Power Apps In Power Apps , go to the Data tab. Click + Add data → Choose SharePoint . Connect to your site and select the UserRoles list. 🟣 Step 3: Corrected App OnStart Code Here’s the fixed and optimized OnStart code: // Get the current user's email Set(CurrentUserEmail, Lower(User().Email)); // Retrieve the user’s role from the SharePoint list ClearCollect( UserRoleCollection, Filter( UserRoles, Lower(Email) = CurrentUserEmail ) ); // Check if a role was found and set flags If( CountRows(UserRoleCollection) > 0, Set(UserRole, First(Us...