IS_GROUP_ACTIVATED
functionsupportedAccounts, users, sessions, warehousesReturns the VARCHAR value 'TRUE' if the role representing an organization user group is activated in a given context.
Syntax
SYS_CONTEXT(
'SNOWFLAKE$ORGANIZATION' ,
'IS_GROUP_ACTIVATED' ,
'<context>' ,
'<group_name>'
)
Parameters
| Name | Required | Description |
|---|---|---|
'SNOWFLAKE$ORGANIZATION' | required | Specifies that you want to call a function to return context information about the current organization. |
'IS_GROUP_ACTIVATED' | required | Calls the IS_GROUP_ACTIVATED function. |
'context' | required | Specifies the execution context that you want to check. You can specify one of the following values: SESSION: Checks if the organization group role is in the role hierarchy of the current session’s primary or secondary roles. The function returns 'TRUE' if the role is in the role hierarchy. ACTIVE: Checks if the organization group role is in the role hierarchy in the context of the current call. For example, in a call to an owner’s rights stored procedure, the procedure is executed by the owner’s role. The function returns 'TRUE' if the organization group role is in the role hierarchy of the owner’s role. |
'group_name' | required | Specifies the name of the organization user group to check. |
Returns
The function returns one of the following VARCHAR values: - 'TRUE' if the organization user group role is activated in the context specified by context. - 'FALSE' if the organization user group role is not activated in that context or if the group is not a valid organization user group. To compare this return value against the BOOLEAN value TRUE or FALSE, cast the return value to BOOLEAN. For example: 2026_06 behavior change bundle When the 2026_06 behavior change bundle is enabled in your account, when you call this function through SYS_CONTEXT, it returns BOOLEAN instead of the VARCHAR string 'TRUE' or 'FALSE'. Existing casts, such as ::BOOLEAN or ::NUMBER, continue to work unchanged. For the return type of every property and function by namespace, see SYS_CONTEXT return types.
See also
- SYS_CONTEXT (SNOWFLAKE$ORGANIZATION namespace) ↗
- IS_GROUP_IMPORTED (SYS_CONTEXT function)
- IS_USER_IMPORTED (SYS_CONTEXT function)