Zion
Zion

Reputation: 21

MS Graph - SharePoint Error: Not adding member

I am calling the Graph API to do the following (directly one after the other),

  1. Create a new User in M365 (e.g. myNewUser)
  2. Add the User to an existing MS Team
  3. Create a Privte Channel (e.g. myPrivateChannel)
  4. Add the User to the Private Channel The user gets created, added to the team, channel etc., But the user was unable to access the files in the Private Channel. After some investigation I found that the user had not been added to the "Members" Group in the corresponding SharePoint Group. I manually added the user and it worked. Also if I the break the steps and give a good gap between the user creation in M365 and adding the user to the Private Channel, it works. But in my situation, I have to do it all at once. That does not work. Looks like there is some issue with this. Any idea what?

Upvotes: 1

Views: 264

Answers (1)

Baker_Kong
Baker_Kong

Reputation: 1889

This is a known issue, there is a lengthy delay current with membership sync.

During the creation of the private channel, the members are not always added to the members' group of the site collection. It's probably causing the weirdness. It's probably causing the weirdness.

Owners probably get added directly to site collection admin of that site collection so it's quicker than members being synced to the SharePoint group itself.

You may have a try below methods:

  • A workaround is to remove and re-add the members to the private channel within Teams.
  • Use SharePoint Rest API to check site groups
  • You can add the user during the channel creation:

enter image description here

BR

Upvotes: 1

Related Questions