PortalItemShareWithGroupsAsync Method (IEnumerablePortalGroup)
Shares this PortalItem with the specified list of PortalGroup
This Method is available only to authenticated users.
Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
public Task<IEnumerable<PortalGroup>> ShareWithGroupsAsync(
Public Function ShareWithGroupsAsync (
groups As IEnumerable(Of PortalGroup)
) As Task(Of IEnumerable(Of PortalGroup))
- Type: System.Collections.GenericIEnumerablePortalGroup
The collection of groups to share the item with.
The task object representing the asynchronous share operation.
The value of the task result is a collection of PortalGroup
objects with which the item was NOT shared.
In order to use the PortalItem.ShareAsync Method, a user must be logged into the ArcGIS Online or
ArcGIS Portal site with proper credentials.
The individual who is authenticated and logged into the portal site that desires to use the
PortalItem.ShareAsync Method to establish which Groups (via their
GroupId values) the
PortalItem is part of MUST meet one of the following criteria:
The authenticated user is the owner of the PortalItem.
The authenticated user is the Administrator of the Organization to which the
The PortalItem has its PortalAccess value
of Public and the authenticated user is the owner of the Group.
Note: the PortalItem may not have been created/owned by the authenticated user; it is
only important that the PortalItem be Public, no matter who created/owns the
The PortalItem has its PortalAccess value of Public and the authenticated user
is the Administrator of the Organization to which Group belongs. Note: the
PortalItem may not have been created/owned by the authenticated user; it is only
important that the PortalItem be Public, no matter who created/owns the
NOTE: Setting the first parameter (groupIds) of the PortalItem.ShareAsync to nothing
does not set any existing Group values. In other words, it does not empty the list of Groups
associated with the PortalItem. The way to remove existing Group values from the
PortalItem is to use the UnshareAsync method.
Using this version of the PortalItem.ShareAsync only modifies Groups for the PortalAccess
level of Shared. If it is desired to add or change the other PortalAccess levels for the
PortalItem, consider using the other version: ShareWithAsync(Boolean, Boolean).