Hi guys
I have created an app to collect Office 365 user info and patch them in the SharePoint list
the thing is it only patches the current user line manager, I want to patch each employee line manager
I have used below code
Hi thanks for your reply count rows show me 66 records which all the employees
originally I used
'Line Manager1':{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & Office365Users.ManagerV2(User().Email).displayName,
Department: "",
DisplayName: Office365Users.ManagerV2(User().Email).displayName,
Email: Office365Users.ManagerV2(User().Email).mail,
JobTitle: "",
Picture: ""
}
then change it to (User().Email)
but still the same issue please see my list
At a first glance your code seems fine. And based on what you have the only way it was act how you describe is if, the user only has permissions to retrieve their own record (which could be the case).
When you are coding and running it in the Studio do you only get 1 record?
Also to verify, if you do a CountRows(Office365Users.SearchUsers()) etc does it only give you 1? because saying it only updates the logged in person, if true, makes it sound as if its a permission problem and the person cannot retrieve any other records.
Can you put a Label on the screen and set the Text to the CountRows of the Search so that you can tell for sure how many rows it should be processing.
If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others
Cheers
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional