---
title: SpEL approval expression examples
description: This section contains SpEL approval expression examples for OAuth and SAML applications.
component: pingcentral
version: 2.2
page_id: pingcentral:pingcentral_for_iam_administrators:pingcentral_expression_examples
canonical_url: https://docs.pingidentity.com/pingcentral/2.2/pingcentral_for_iam_administrators/pingcentral_expression_examples.html
revdate: June 25, 2024
section_ids:
  oauth-approval-example: OAuth approval example
  saml-sp-approval-example: SAML SP approval example
---

# SpEL approval expression examples

This section contains SpEL approval expression examples for OAuth and SAML applications.

## OAuth approval example

In this example, if the **Require Approval If Any Expression Succeeds** option is selected and the application is an OAuth application with the **Client Credentials** grant type, PingCentral requires that an administrator approve the promotion before the application owner can promote it to the target environment.

```
#jsonPath(#application, 'type').equals('OAuth')
&& #jsonPath(#application,
'grantTypes').contains('CLIENT_CREDENTIALS')
```

## SAML SP approval example

In this example, if the **Require Approval If Any Expression Succeeds** option is selected, the application is a SAML SP application, and one or more of the attribute mappings are OGNL expressions, PingCentral requires that an administrator approve the promotion before the application owner can promote it to the target environment.

```
#jsonPath(#application, 'type').equals('SAML_20_SP')
&& !#jsonPath(#application,
"attributeMappings[?(@.type == 'EXPRESSION')]").isEmpty()
```
