question

DanielChok-9925 avatar image
0 Votes"
DanielChok-9925 asked SharonZhao-MSFT answered

Graph API create groups and teams from SPFx webpart with elevated privileges

I have a SPFx webpart which is a form for users to submit requests which will run the group and teams provisioning code.

The code works fine when the user is logged in as a 'Global Admin', but when a normal user with minimum permission levels uses the form, the provisioning is not allowed and is faced with these errors:

Creating group is not allowed:
8438-tenant-admin-has-not-enabled-unified-group-creatio.png


Creating teams is not allowed:
8330-teams-disabled-in-user-license-admin-non-prod-subm.png

Is there a way to run the code regardless of the user context? or any ways to elevate the privilege of the webpart or block of code?


office-teams-windows-itproazure-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SharonZhao-MSFT avatar image
0 Votes"
SharonZhao-MSFT answered

Hi DanielChok-9925,

When you create a new team under a group, one of the following permissions is required to this API.
8409-350.png
When you create a new group, one of the following permissions is required to call this API.
8457-351.png
If it has no help, we suggest you ask for help in MSDN forum.



350.png (8.7 KiB)
351.png (9.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.