Skip to main content
⚠️ AppKit is in an early development phase and is subject to change without notice. DO NOT use in production environments.

# Function: getExecutionContext()

    function getExecutionContext(): ExecutionContext;

Get the current execution context.

- If running inside a user context (via asUser), returns the user context
- Otherwise, returns the service context

## Returns​

`ExecutionContext`

## Throws​

Error if ServiceContext is not initialized