Get Policy Users
Purpose
This API is used to retrieve a list of users associated with a policy.
OAuth Scope
Use the scope
ZohoMail.organization.policy.ALL (or) ZohoMail.organization.policy.READ
to generate the Authtoken.
ALL - Provides full access to policy.
READ - Retrieve the list of users associated with the policy.
Request URL
Method: GET
https://mail.zoho.com/api/organization/{zoid}/policy/{policyId}/getUsers
Path Parameters
- zoid* long
- This parameter denotes the unique Zoho Organization Identifier for the organization.
- This parameter can be retrieved from the Get organization Details API.
- policyId* long
- This parameter is used to identify the policy.
- This parameter can be retrieved from the Get All Policies API.
Query Parameters
- start int
- This parameter specifies the start sequence number of the users associated with the policy to be retrieved.
- The default value is 0.
- limit int
- This parameter specifies the number of users to be retrieved from the start value mentioned.
- The default value is 10.
- searchKey string
- This parameter specifies the particular data to search for.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/organization/12345678/policy/45677777/getUsers?limit=10&start=0" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***"
Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": [
{
"emailAddress": "rebecca@zylker.com",
"role": 2,
"displayName": "rebecca",
"zuid": 53671954
},
{
"emailAddress": "paula@zylker.com",
"role": 1,
"displayName": "testzylker",
"zuid": 54122735
}
]
}