Forum Discussion
SharePoint site for Office 365 group not created when group is created programmatically via Graph
- Aug 29, 2017
This is now working as expected. You can create O365 groups with SharePoint sites via Graph API using app-only credentials. I am using the PnP UnifiedGroups utility and this works pretty well with a few exceptions though now and than.
Yes I have tried it but had problems with the athentification token which always gave me "Unauthorized" (or something) even if the app had full permisions in Azure AD. After several tries I found an other way which works.
My current coding works fine with only Read/Write Group permission, but the site is not created. For this I use a user context to activate by doing a get-request.
I had the same issue with app only authentication and ended up with the same solution as you - make a http request authenticating as a user. The PnP library internally makes a request to the Graph API root drive to try and trigger the site to be provisioned but this too fails with app-only credentials.
Would love to see this change as it's really messy to do http requests as a user in our provisioning engine when we would rather just use app-only authentication.
- Bernd RickenbergAug 29, 2017Copper Contributor
This is now working as expected. You can create O365 groups with SharePoint sites via Graph API using app-only credentials. I am using the PnP UnifiedGroups utility and this works pretty well with a few exceptions though now and than.