I created a group via MSGraph API. It worked fine. Group was created with owners, members and so on. Now I created a Team in MSTeams out of the group manually. But I can't send files because there is no sharepoint site!
I tried to get the sharepoint link via GraphExplorer but it responses 404.
So I tested the API via GraphExplorer and created a group with it. It works. There is the group, and the sharepoint site...
This is the code for creating a new Group. (IT's the same Code like in the MSDocs)
IGraphServiceClient graphApplicationClient = _initGraphServiceApplicationClient();
Group group = new Group();
group.displayName = pGroupDisplayName;
group.description = pGroupDescription;
group.mailEnabled = pMailEnabled;
group.mailNickname = pGroupMailNickname;
group.securityEnabled = pSecurityEnabled;
//Office Group
LinkedList<String> groupTypesList = new LinkedList<>();
groupTypesList.add("Unified");
group.groupTypes = groupTypesList;
group.additionalDataManager().put("[email protected]", _buildMemberJsonArray(pAzureOwnerIds));
pAzureMemberIds.addAll(pAzureOwnerIds);
group.additionalDataManager().put("[email protected]", _buildMemberJsonArray(pAzureMemberIds));
Group groupResponse = graphApplicationClient.groups().buildRequest().post(group);
return groupResponse.id;
If I run this in my Java application, the request is working fine. But there is no Sharepoint site created with it. If I go to AzurePortal -> Groups there is no Group link to sharepoint. If I do the same request with the same Url, members, owners, properties in Postman or GraphExplorer, it creates a sharepoint in under 1 minute.
Why doesn't it work with code???
This is the group in azure if I create it with code and create a team out of it manually
Still waiting for a sharepoint
This is the group in azure if I create it with azure and create a team out of it manually
[
Sharepoint in under 1minute created..
Best regards!