How to generate a SharePoint List to pull users from Office 365?

%3CLINGO-SUB%20id%3D%22lingo-sub-1333124%22%20slang%3D%22en-US%22%3EHow%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1333124%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20created%20some%20great%20SharePoint%20lists%20for%20deployment%20purposes%20and%20the%20one%20SWEET%20function%20I%20would%20like%20to%20see%20is%20every%20time%20we%20generate%20a%20new%20SP%20list%2C%20it%20populates%20the%20Name%20field%20with%20users%20from%20Office%20365%20based%20on%20the%20location.%26nbsp%3B%20This%20would%20allow%20us%20to%20get%20active%20user%20lists%20instead%20of%20manually%20adding%20them.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20workaround%20we%20know%20works%20now%20is%20to%20export%20the%20users%20from%20Office%20365%20into%20a%20csv%20file%20and%20then%20import%20them%20into%20the%20list.%26nbsp%3B%20I%20would%20like%20this%20%22process%22%20to%20happen%20automatically%20when%20the%20list%20is%20created.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1333124%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1333313%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1333313%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F106222%22%20target%3D%22_blank%22%3E%40Derek%20Gillespie%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESounds%20like%20you're%20going%20to%20want%20to%20create%20an%20app%20for%20this.%20Use%20the%20MS%20Graph%20for%20the%20User%20Info%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fuser-list%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fuser-list%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1333893%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1333893%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F228093%22%20target%3D%22_blank%22%3E%40Timothy%20Balk%3C%2FA%3Ethanks%20for%20the%20reply.%26nbsp%3B%20Taking%20a%20few%20steps%20back%2C%20create%20an%20app%3F%26nbsp%3B%20As%20in%20Power%20Apps%3F%26nbsp%3B%20Our%20environment%20is%20completely%20O365.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1335646%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1335646%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F106222%22%20target%3D%22_blank%22%3E%40Derek%20Gillespie%3C%2FA%3E%26nbsp%3BYes%2C%20that%20would%20be%20one%20way.%20Initiate%20the%20creation%20of%20the%20process%20via%20a%20PowerApp%20-%20collect%20the%20data%20you%20need%20to%20create%20the%20list%2C%20then%20trigger%20a%20PowerAutomate%20workflow%20to%20create%20the%20list%20and%20populate%20the%20list%20with%20the%20data%20from%20the%20User%20Graph%20API.%20I%20think%20the%20connector%20to%20create%20the%20list%20and%20pull%20the%20user%20data%20to%20the%20list%20may%20be%20custom%20connectors%20and%20would%20require%20some%20premium%20licenses%20to%20get%20that%20accomplished.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20the%20other%20app%20route%20would%20be%20to%20deploy%20PnP%20kind%20of%20solution%20that%20someone%20would%20have%20to%20write%20code%20to%20make%20things%20happen.%20Unfortunately%2C%20I'm%20not%20very%20familiar%20with%20what%20it%20would%20take%20to%20do%20this.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2149946%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149946%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F228093%22%20target%3D%22_blank%22%3E%40Timothy%20Balk%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWithout%20delving%20into%20learning%20PowerApps%20just%20yet%2C%26nbsp%3B%20is%20there%20a%20simple%20way%20to%20ask%20Sharepoint%20to%20auto%20load%20employee%20information%20like%20name%2C%20email%2C%20or%20dept%20based%20on%20Azure%20Active%20Directory%20information%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECurrently%2C%20I%20can%20search%2Ffind%20employees%20and%20add%20them%20to%20Sharepoint%20List%20column%20by%20searching%20for%20them%20using%20a%20company%20email%20address.%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BWe%20also%20have%20unique%20identifiers%20like%20employee%20numbers%20that%20I'd%20like%20to%20use%20instead.%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20How%20can%20I%20instruct%20SP%20to%20search%20for%20a%20person%20based%20on%20this%20number%20instead%20of%20their%20email%20address%3F%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B2)%20How%20can%20I%20link%20columns%20for%20%22auto%20filling%22%20subsequent%20columns%20with%20name%2C%20email%2C%20dept%2C%20etc%20from%20the%20unique%20number%20in%20Azure%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20your%20insight%20and%20thank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2151876%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2151876%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F964997%22%20target%3D%22_blank%22%3E%40ninjaryder%3C%2FA%3E%26nbsp%3Bactually%20I'd%20say%20that%20using%20Power%20Apps%20is%20your%20best%20option%3B%20it's%20not%20difficult%20to%20get%20or%20search%20for%20employees.%20We%20use%20it%20for%20a%20staff%20search%20app%20I%20built%20where%20you%20can%20enter%20the%20first%20letters%20of%20a%20name%2C%20job%20title%2C%20location%20or%20team%20name%20to%20bring%20back%20all%20the%20data%20on%20the%20employee(s)%20from%20Delve.%20We%20have%20over%201000%20staff%20in%20our%20division%20and%20it%20runs%20very%20quickly.%20There%20are%20a%20lot%20of%20very%20good%20videos%20about%20Power%20Apps%20by%20Shane%20Young%20on%20YouTube%20and%20I%20recommend%20you%20have%20a%20look%20at%20those.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2155839%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2155839%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F964997%22%20target%3D%22_blank%22%3E%40ninjaryder%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20thinking%20a%20bit%20on%20this%20-%20I%20think%20I%20need%20more%20information...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%20pass%20at%20this%20problem%2C%20I%20would%20look%20at%20modifying%20the%20user%20profile%20synchronization%20attributes%20in%20the%20SharePoint%20Admin%20Center.%20Add%20the%20custom%20attribute%20for%20the%20ID%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fadd-and-edit-user-profile-properties%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAdd%20and%20edit%20user%20profile%20properties%20in%20SharePoint%20-%20SharePoint%20in%20Microsoft%20365%20%7C%20Microsoft%20Docs%3C%2FA%3E%26nbsp%3Bthen%20you%20have%20to%20manage%20a%20process%20to%20sync%20this%20property%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fsolution-guidance%2Fbulk-user-profile-update-api-for-sharepoint-online%23call-the-import-api-from-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBulk%20update%20custom%20user%20profile%20properties%20for%20SharePoint%20Online%20%7C%20Microsoft%20Docs%3C%2FA%3E%26nbsp%3Bwhich%20is%20kind%20of%20a%20bummer%20-%20if%20this%20were%20on-prem%2C%20you%20would%20be%20able%20to%20configure%20this%20custom%20property%20to%20pull%20the%20information%20from%20the%20synchronization%20connection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20for%20the%20search%20portion%2C%20are%20you%20talking%20about%20search%20via%20the%20people%20pickers%3F%20or%20about%20Search%20in%20the%20tenant%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESearch%20in%20the%20tenant%20*I%20think*%20would%20automatically%20start%20indexing%20the%20custom%20attribute%20and%20would%20be%20searchable%20in%20the%20%22People%22%20portion%20of%20search.%20If%20it%20doesn't%20add%20it%20in%20automatically%2C%20you%20can%20modify%20the%20search%20schema%20and%20map%20the%20property%20to%20a%20managed%20property%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fmanage-search-schema%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EManage%20the%20search%20schema%20in%20SharePoint%20-%20SharePoint%20in%20Microsoft%20365%20%7C%20Microsoft%20Docs%3C%2FA%3E%26nbsp%3Bthen%20this%20property%20could%20be%20used%20in%20search.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20out%20of%20the%20box%20people%20picker%20is%20something%20different%20-%20honestly%20I%20don't%20think%20you%20could%20modify%20this%20to%20be%20searchable%20via%20a%20custom%20attribute.%20Also%2C%20I'm%20fairly%20sure%20the%20people%20pickers%20use%20Azure%20AD%20in%20SharePoint%20Online%20and%20the%20search%20function%20for%20this%20is%20immutable.%20I've%20submitted%20a%20few%20tickets%20to%20try%20to%20see%20if%20we%20could%20make%20the%20people%20picker%20remove%20accounts%20based%20on%20attributes%20in%20their%20profile%20and%20those%20answers%20have%20been%20%22No%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20far%20as%20the%20information%20aside%20from%20the%20Custom%20ID%20attribute%20-%20have%20you%20had%20a%20look%20at%20the%20hidden%20user%20list%3F%20%3CTENANT%20sp%3D%22%22%20online%3D%22%22%20url%3D%22%22%3E%2F_catalogs%2Fusers%2Fsimple.aspx%20Maybe%20this%20could%20be%20useful%3F%3C%2FTENANT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2155896%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2155896%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F228093%22%20target%3D%22_blank%22%3E%40Timothy%20Balk%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20Timothy..%26nbsp%3B%20%26nbsp%3BThe%20Tenant%20and%20People%20Pickers%20are%20tools%2Flanguage%20hare%20are%20above%20my%20knowledge%2Fskill%20level..%26nbsp%3B%20I%20also%20do%20not%20have%20access%20to%20the%20Sharepoint%20Admin%20Center%20as%20I'm%20not%20in%20IT.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20appreciate%20the%20response%2C%20but%20it%20might%20be%20that%20I%20need%20to%20learn%20PowerApps%20to%20build%20this.%26nbsp%3B%20I%20appreciate%20your%20insight%20and%20response%2C%20however.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2156499%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2156499%22%20slang%3D%22en-US%22%3ECould%20always%20ask%20IT%20about%20that%20identifier%20-%20if%20it's%20in%20the%20information%20for%20the%20users'%20profiles.%20I%20would%20think%20something%20like%20that%20would%20have%20been%20included%20since%20it%20sounds%20like%20the%20identifier%20is%20pretty%20important.%3CBR%20%2F%3E%3CBR%20%2F%3EDon't%20be%20afraid%20to%20ask%20-%20if%20they're%20not%20sure%2C%20reference%20some%20of%20the%20documentation%20to%20support%20the%20question%2Frequest.%20Depending%20on%20the%20size%20of%20the%20company%20you%20work%20for%20-%20it%20might%20be%20easy%20to%20implement%20it.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2783006%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20generate%20a%20SharePoint%20List%20to%20pull%20users%20from%20Office%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2783006%22%20slang%3D%22en-US%22%3E%40RobElliot%2C%20How%20did%20you%20get%20around%20delegation%20issues%3F%20How%20did%20you%20get%20the%20information%20from%20Delve%20rather%20than%20O365%20users%3F%20I%20am%20building%20an%20app%20where%20my%20data%20source%20is%20365%20connector%20and%20I%20am%20only%20retrieving%20some%20of%20the%20records%20and%20it's%20driving%20me%20bonkers.%3C%2FLINGO-BODY%3E
Contributor

We have created some great SharePoint lists for deployment purposes and the one SWEET function I would like to see is every time we generate a new SP list, it populates the Name field with users from Office 365 based on the location.  This would allow us to get active user lists instead of manually adding them.

 

One workaround we know works now is to export the users from Office 365 into a csv file and then import them into the list.  I would like this "process" to happen automatically when the list is created.

 

Any ideas?

9 Replies

@Derek Gillespie 

 

Sounds like you're going to want to create an app for this. Use the MS Graph for the User Info - https://docs.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http

@Timothy Balkthanks for the reply.  Taking a few steps back, create an app?  As in Power Apps?  Our environment is completely O365.

@Derek Gillespie Yes, that would be one way. Initiate the creation of the process via a PowerApp - collect the data you need to create the list, then trigger a PowerAutomate workflow to create the list and populate the list with the data from the User Graph API. I think the connector to create the list and pull the user data to the list may be custom connectors and would require some premium licenses to get that accomplished.

 

So the other app route would be to deploy PnP kind of solution that someone would have to write code to make things happen. Unfortunately, I'm not very familiar with what it would take to do this.

@Timothy Balk 

 

Without delving into learning PowerApps just yet,  is there a simple way to ask Sharepoint to auto load employee information like name, email, or dept based on Azure Active Directory information?  

 

Currently, I can search/find employees and add them to Sharepoint List column by searching for them using a company email address.     We also have unique identifiers like employee numbers that I'd like to use instead.   

1) How can I instruct SP to search for a person based on this number instead of their email address?     2) How can I link columns for "auto filling" subsequent columns with name, email, dept, etc from the unique number in Azure?

 

Appreciate your insight and thank you!

 

@ninjaryder actually I'd say that using Power Apps is your best option; it's not difficult to get or search for employees. We use it for a staff search app I built where you can enter the first letters of a name, job title, location or team name to bring back all the data on the employee(s) from Delve. We have over 1000 staff in our division and it runs very quickly. There are a lot of very good videos about Power Apps by Shane Young on YouTube and I recommend you have a look at those.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

 

 

@ninjaryder 

 

I'm thinking a bit on this - I think I need more information...

 

First pass at this problem, I would look at modifying the user profile synchronization attributes in the SharePoint Admin Center. Add the custom attribute for the ID: Add and edit user profile properties in SharePoint - SharePoint in Microsoft 365 | Microsoft Docs then you have to manage a process to sync this property - Bulk update custom user profile properties for SharePoint Online | Microsoft Docs which is kind of a bummer - if this were on-prem, you would be able to configure this custom property to pull the information from the synchronization connection.

 

Now for the search portion, are you talking about search via the people pickers? or about Search in the tenant?

 

Search in the tenant *I think* would automatically start indexing the custom attribute and would be searchable in the "People" portion of search. If it doesn't add it in automatically, you can modify the search schema and map the property to a managed property Manage the search schema in SharePoint - SharePoint in Microsoft 365 | Microsoft Docs then this property could be used in search.

 

The out of the box people picker is something different - honestly I don't think you could modify this to be searchable via a custom attribute. Also, I'm fairly sure the people pickers use Azure AD in SharePoint Online and the search function for this is immutable. I've submitted a few tickets to try to see if we could make the people picker remove accounts based on attributes in their profile and those answers have been "No".

 

As far as the information aside from the Custom ID attribute - have you had a look at the hidden user list? <Tenant SP Online URL>/_catalogs/users/simple.aspx Maybe this could be useful?

 

 

@Timothy Balk 

Thanks Timothy..   The Tenant and People Pickers are tools/language hare are above my knowledge/skill level..  I also do not have access to the Sharepoint Admin Center as I'm not in IT.  

 

I appreciate the response, but it might be that I need to learn PowerApps to build this.  I appreciate your insight and response, however. 

Could always ask IT about that identifier - if it's in the information for the users' profiles. I would think something like that would have been included since it sounds like the identifier is pretty important.

Don't be afraid to ask - if they're not sure, reference some of the documentation to support the question/request. Depending on the size of the company you work for - it might be easy to implement it.
@RobElliot, How did you get around delegation issues? How did you get the information from Delve rather than O365 users? I am building an app where my data source is 365 connector and I am only retrieving some of the records and it's driving me bonkers.