Graph API: Post to groups does not work

DaKi 0 Reputation points
2025-05-12T12:02:54.9166667+00:00

I'm trying to post to https://graph.microsoft.com/v1.0/groups

{
    "displayName":"First group",
    "isAssignableToRole":true,
    "mailEnabled":false,
    "mailNickname":"1b40e607-d220-41ae-8f7c-11c8290ad2a2",
    "securityEnabled":true,
    "uniqueName":"first-group"
}

Consent is as follows:

Group.ReadWrite.All and Directory.ReadWrite.All are granted.image

Event though I have the consent, I get an error:

Forbidden - 403 - 193 ms Either the signed-in user does not have sufficient privileges, or you need to consent to one of the permissions on the Modify permissions tabUser's image

The same request does work for another tenant. Did something change for new tenants?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 123.6K Reputation points MVP Volunteer Moderator
    2025-05-12T16:40:17.8066667+00:00

    Since you are running this query in Graph explorer, i.e. via delegate permissions, you need to check the admin role assigned to the user. At the very least, you need Privileged Role Administrator. The permissions granted on the Graph explorer itself are not enough.

    0 comments No comments

  2. SrideviM 5,840 Reputation points Moderator
    2025-05-14T09:50:38.05+00:00

    Hello DaKi,

    I understand you're trying to create a security group using the Microsoft Graph API and encountering a 403 Forbidden error, even though the necessary permissions are granted.

    This might be due to a tenant-level setting in Microsoft Entra ID that controls whether users or apps can create security groups.

    To review this setting, go to the Azure portal, open Microsoft Entra ID, and navigate to Groups > General. Look for the option "Users can create security groups in Azure portals, API or PowerShell". If it’s set to "No", that could be preventing group creation via API.

    Here’s what the setting looks like:

    User's image

    I too got same error when I tried to create group through Graph API when above setting is disabled:

    User's image

    To resolve this, a user with Global Administrator rights can change the setting to "Yes" like shown below:

    User's image

    These settings can take up to 15 minutes to take effect. Once the setting is enabled, the API request to create the group should go through successfully:

    User's image

    Let me know if you have any further questions. Happy to assist.

    Hope this helps!


    If this answers your query, do click Accept Answer and Yes for was this answer helpful, which may help members with similar questions.

    User's image

    If you have any other questions or are still experiencing issues, feel free to ask in the "comments" section, and I'd be happy to help.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.