ListAuthorizedAppsByUser

Updated at:

Performs a paging query to retrieve the applications for which a specified user has obtained access permissions through application authorization, and supports fuzzy filtering by app instance group ID, app instance group name, application ID, or application name.

Operation description

Operation description

This operation queries the applications authorized for a specified user at the application level. It returns only the records of applications authorized for the user at the application level (for example, authorization completed by calling the AuthorizeUsersForApp operation). Authorization granted for an entire app instance group by calling the AuthorizeInstanceGroup operation is not included in the response.

The response is deduplicated by the combination of app instance group and application. Each record corresponds to an application within an app instance group.

Before you begin

  • The user exists in the current account. If the user does not exist, the error code User.NotFound is returned. You can call the DescribeUsers operation to obtain the username.

  • The app instance group to which the application belongs has been created, and the application has been authorized for the user at the application level. If no application-level authorization has been performed, an empty application list is returned.

Metric description

  • EndUserId and ProductType are required. Set ProductType to CloudApp, which indicates WUYING Cloud App.

  • AppInstanceGroupId, AppId, AppInstanceGroupName, and AppName are optional filter conditions. Fuzzy match is used for all these parameters, and they can be used in any combination. If all of them are omitted, all application-level authorization records for the user are returned.

  • Use PageNumber and PageSize for paging. PageNumber starts from 1, and the valid values for PageSize range from 1 to 100. You can determine whether to continue the query based on the returned TotalCount.

Call sequence

  1. Call the ListAppInstanceGroup or GetAppInstanceGroup operation to obtain the app instance group ID (AppInstanceGroupId) and the application IDs (AppId in the Apps list) of the applications deployed in the app instance group.

  2. Call the AuthorizeUsersForApp operation to authorize the applications for the target user.

  3. Call this operation to query the applications authorized for the user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

appstreaming:ListAuthorizedAppsByUser

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProductType

string

Yes

The product type. Required. The value is not case-sensitive.

This operation queries application-level authorization records. This authorization method applies to WUYING Cloud App instance groups. Valid values:

  • CloudApp: WUYING Cloud App.

CloudApp

PageNumber

integer

Yes

The page number of the returned results. Required. The value starts from 1.

1

PageSize

integer

Yes

The number of entries to return on each page. Required. Valid values: 1 to 100.

10

AppInstanceGroupId

string

No

The app instance group ID, which is used to filter results. Fuzzy match based on inclusion is used. This parameter can be used in combination with other filter parameters. You can call the ListAppInstanceGroup operation to obtain the value.

aig-9ciijz60n4xsv****

AppId

string

No

The application ID, which is used to filter results. Fuzzy match based on inclusion is used. This parameter can be used in combination with other filter parameters. You can obtain the value from the Apps list returned by the GetAppInstanceGroup operation.

ca-i87mycyn419nu****

EndUserId

string

Yes

The username to query. Required. The user must exist in the current account. You can call the DescribeUsers operation to obtain the username.

alice

AppInstanceGroupName

string

No

The app instance group name, which is used to filter results. Fuzzy match based on the name is used. This parameter can be used in combination with other filter parameters.

Office applications

AppName

string

No

The application name, which is used to filter results. Fuzzy match based on the name is used. This parameter can be used in combination with other filter parameters.

Office applications

Response elements

Element

Type

Description

Example

object

Schema of Response

Apps

array<object>

The list of applications authorized for the user. Each record corresponds to an application within an app instance group.

object

AppIcon

string

The access URL of the application icon. This parameter is empty when the deployment details of the application cannot be obtained.

https://app-center-icon-****.png

AppId

string

The application ID.

ca-i87mycyn419nu****

AppInstanceGroupId

string

The ID of the app instance group to which the application belongs.

aig-9ciijz60n4xsv****

AppInstanceGroupName

string

The name of the app instance group to which the application belongs. If the app instance group information cannot be obtained, the returned value is the same as the AppInstanceGroupId.

Office applications

AppName

string

The application name. If the deployment details of the application cannot be obtained, the returned value is the same as the AppId.

Office applications

AppVersion

string

The application version. This parameter is empty when the deployment details of the application cannot be obtained.

1.0.0

AppVersionName

string

The application version name. This parameter is empty when the deployment details of the application cannot be obtained.

Initial version

AuthorizedUserCount

integer

The number of users authorized to access the application in the app instance group to which the application belongs. This parameter is empty when the deployment details of the application cannot be obtained.

3

PageNumber

integer

The page number of the returned results.

1

PageSize

integer

The number of entries returned on each page.

10

RequestId

string

The request ID.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

TotalCount

integer

The total number of authorization records that meet the query conditions.

15

Examples

Success response

JSON format

{
  "Apps": [
    {
      "AppIcon": "https://app-center-icon-****.png",
      "AppId": "ca-i87mycyn419nu****",
      "AppInstanceGroupId": "aig-9ciijz60n4xsv****",
      "AppInstanceGroupName": "OfficeApp",
      "AppName": "OfficeApp",
      "AppVersion": "1.0.0",
      "AppVersionName": "InitialVersion",
      "AuthorizedUserCount": 3
    }
  ],
  "PageNumber": 1,
  "PageSize": 10,
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "TotalCount": 15
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.