How do I update community membership using the API?
- Get the networkId for your community. From Setup, enterAll Communities in the QuickFind box, select All Communities, and then right-click your community URL and select Inspect. Thedata-networkId property provides yournetworkId.
- Get the profileId or permissionsetId you want to add.From Setup, enter Profiles in the Quick Find box, then select Profiles or Permission Sets. Click on the profile or permission set that you want to add. The ID is the last part of the URL.For example, atmycompany.salesforce.com/00aa11bb22, the ID is00aa11bb22.
- Create a .csv file with columns for networkId and parentId. For parentId, list the profileId or permissionsetId you want to add.
- Open Data Loader and select the Network Member Group object. Specify the location of the .csv file you created and complete the Data Loader steps.