# Get single rule

> Retrieves a SAML provisioning rule by its ID within an organization.

Retrieves a SAML provisioning rule by its ID within an organization.

## Endpoint

`GET /api/Rule/{partitionGlobalId}/{ruleId}`

## Request headers

```
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
```

## Parameters

| Name | Type | Location | Required | Description |
| --- | --- | --- | --- | --- |
| `partitionGlobalId` | GUID | Path | Yes | The global identifier of the organization.  For steps on retrieving `partitionGlobalId`, refer to [Retrieving partitionGlobalId for API use](https://docs.uipath.com/test-cloud/automation-cloud/latest/api-guide/retrieving-partitionglobalid-for-api-use). |
| `ruleId` | Integer | Path | Yes | The unique identifier of the rule |

## Responses

:::note
* Unlike the **Get Rules in bulk** endpoint, the **Get Rule** endpoint resolves
`assignedGroups` as full group objects.
* `definition` is returned as a JSON-encoded string, not as a parsed
object.
* Optional fields, such as `description`, may be returned as empty
strings.
* `groupType` is returned as a numeric value (enum-backed).
* Additional fields, such as `mappedRole` and `scope`, may
be present depending on the group type and environment.
:::

```
{
  "id": 2607,
  "partitionGlobalId": "00000000-0000-0000-0000-000000000000",
  "name": "Automation Users",
  "description": "",
  "enabled": true,
  "definition": "{\"GroupsToAssign\":[\"cdc34b5b-77d2-4ae1-9744-209d21ce557d\"],\"Conditions\":[{\"ClaimName\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress\",\"ConditionType\":\"Contains\",\"Value\":\"uipath.com\"}]}",
  "assignedGroups": [
    {
      "id": "cdc34b5b-77d2-4ae1-9744-209d21ce557d",
      "name": "Automation Users",
      "displayName": "Automation Users",
      "type": 0,
      "creationTime": "2021-01-22T16:29:33.7917688",
      "lastModificationTime": "2021-01-22T16:29:33.7917689",
      "members": [],
      "mappedRole": null,
      "scope": null
    }
  ]
}
```

## Example request

```
{
  "id": 2607,
  "partitionGlobalId": "00000000-0000-0000-0000-000000000000",
  "name": "Automation Users",
  "description": "",
  "enabled": true,
  "definition": "{\"GroupsToAssign\":[\"cdc34b5b-77d2-4ae1-9744-209d21ce557d\"],\"Conditions\":[{\"ClaimName\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress\",\"ConditionType\":\"Contains\",\"Value\":\"uipath.com\"}]}" ,
  "assignedGroups": [
    {
      "id": "cdc34b5b-77d2-4ae1-9744-209d21ce557d",
      "name": "Automation Users",
      "displayName": "Automation Users",
      "type": 0,
      "creationTime": "2021-01-22T16:29:33.7917688",
      "lastModificationTime": "2021-01-22T16:29:33.7917689",
      "members": []
    }
  ]
}
```
