Method ShareWithAsync
ShareWithAsync(Boolean, Boolean)
Shares the portal item with everyone or just with the user's organization. If both 'everyone' and 'organization' arguments are true, the item will be shared with everyone (Public). If both 'everyone' and 'organization' arguments are false, the item will be made private, unless the item has been shared with one or more groups. In that case, the items Access property will be set to Shared. The groups an item has been shared with are not affected by this method. This Method is available only to authenticated users.
Declaration
public Task ShareWithAsync(bool everyone, bool organization)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | everyone | If true, this item will be shared with everyone, for example, it will be publicly accessible. If false, the item will not be shared with the public. |
System.Boolean | organization | If true, this item will be shared with the organization. If false, the item will not be shared with the organization. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous share operation. |
Remarks
In order to use ShareWithAsync(Boolean, Boolean) a user must be logged into the portal site with proper credentials.
The individual who is authenticated and logged into the portal site that desires to use ShareWithAsync(Boolean, Boolean) 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 PortalItem belongs.
- 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 PortalItem.
- 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 PortalItem.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |
ShareWithAsync(Boolean, Boolean, CancellationToken)
Shares the portal item with everyone or just with the user's organization. If both 'everyone' and 'organization' arguments are true, the item will be shared with everyone (Public). If both 'everyone' and 'organization' arguments are false, the item will be made private, unless the item has been shared with one or more groups. In that case, the items Access property will be set to Shared. The groups an item has been shared with are not affected by this method. This Method is available only to authenticated users.
Declaration
public Task ShareWithAsync(bool everyone, bool organization, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | everyone | If true, this item will be shared with everyone, for example, it will be publicly accessible. If false, the item will not be shared with the public. |
System.Boolean | organization | If true, this item will be shared with the organization. If false, the item will not be shared with the organization. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken with which to cancel the operation if required. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous share operation. |
Remarks
In order to use ShareWithAsync(Boolean, Boolean) a user must be logged into the portal site with proper credentials.
The individual who is authenticated and logged into the portal site that desires to use ShareWithAsync(Boolean, Boolean) 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 PortalItem belongs.
- 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 PortalItem.
- 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 PortalItem.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.2 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.14 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |