Powershell Create Office 365 Groups (unified) with assets

Steel Contributor
Good evening fellow members. Before I put forward a proposal can I please ask if it is possible to programmatically create an Office 365 Group (unified) plus populate it with assets. Assets meaning 'copying' documents from an existing SharePoint library when the group has been created. I am presuming the correct method is using the Graph API, but does this allow the ability to automate the population of the assets as well? Hope someone can give me a 'Yes it is possible' or no not yet! Many thanks for any help.
3 Replies
Yes, this is absolutely possible...bear in mind that you could find some challenges in regards of when the Group SPO Site is created, but technically you can just create a schedule task that check if the Group site is ready so documents are loaded in the document library...and yes, the right approach to do this is by means of the Graph. Take also a look at the possibilities provided by PnP n regards of provisioning modern team sites with a Group attached
Thank Juan, I am pleased about that. Needed to double check in case i was just happily wishing!

You could do it with the new Site Design Scripts as well, once your site is created the script could trigger a Flow, and Flow could copy some content. No polling required, it would all be triggered when the site is created from the design. See