Forum Discussion
Michael Schau
Jul 03, 2018Tin Contributor
Create Office 365 group for existing Team site
I'm having issues calling https://msdn.microsoft.com/en-us/library/microsoft.online.sharepoint.tenantadministration.tenant.creategroupforsite.aspx using Azure AD App Only client context. I'm rec...
Deleted
Jul 03, 2018Not applicable
do you have the Active directory read and write permissions in the app only context? as you need them as well.
Michael Schau
Jul 04, 2018Tin Contributor
I've added Application permission Read and write directory data (Directory.ReadWrite.All), but it doesn't make a difference.
Group.ReadWrite.All is added as Delegated permission as it doesn't exist as Application permission. Does this mean that it isn't possible to use an AppOnly context (no user context).
- DeletedJul 04, 2018Not applicable
Please take a look at the site of John as he managed to do this http://johnliu.net/blog/2017/1/create-many-o365-groups-with-powershell-resource-owner-granttype-and-microsoft-graph
- Michael SchauJul 05, 2018Tin Contributor
Thanks Deleted
Appreciate it, however I don't see that there's an API for this in the Graph. Sure you can create a Group, but I need to "groupify" an existing SharePoint site collection.
The SharePoint API is
{siteUrl}/_api/GroupSiteManager/CreateGroupForSite
But again, it cannot be called using AppOnly context.
I guess the conclusion is that it is not possible yet.
- DeletedJul 05, 2018Not applicable
Hi Michael,
True it is not possibble yet but with the solution of John you could create a account which only can do what you want.
Kind regards,
Paul