Microsoft Graph - group mailNickname update not taking effect

Oscar Cedano 21 Reputation points
2022-08-15T07:10:03.063+00:00

Hi all,

I am in need of updating the primary email address of a MS 365 group. According to the Graph API docs, in order to do this, you need to send a PATCH request to the following endpoint /v1.0/groups/{groupId} with the following request body:

{  
      mailNickname: "newMailNickname"  
}  

After doing so, I am getting a 204 - No Content Response, which according to the documentation (https://learn.microsoft.com/en-us/graph/api/group-update), indicates a successful operation.
However, the update is not reflecting on the Admin Console. Whenever I navigate to the updated group, the primary email address property still points to the mailNickname assigned during creation. I also waited 24 hours, in case this update occurs asynchronously, but nothing changed after that window. Changing this email address through the console works fine. API updates to any other group properties (e.g displayName) also work fine.

P.S. I'm trying to update a group that got created as a result of creating a team by calling POST /v1.0/teams. According to the docs, the team and the underlying group share the same id.

Any help would be appreciated.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,715 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,696 Reputation points Microsoft Vendor
    2022-08-15T10:03:18.837+00:00

    Hi @Oscar Cedano ,

    With Microsoft Graph do not have a provision to update group email address as it is read-only property.
    Even Microsoft/Exchange Admin center or Azure AD Portal we can not edit 'mail' property for unified groups.

    Alternatively take a look at set-unifiedgroup.

    References:

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".