The documentation on both the Forge Remote essentials page and the invoke-remote API reference states that `invokeRemote` calls from backend functions do not receive a `context` claim. However, I observed the opposite behavior.
When I called `invokeRemote` from a backend trigger function handling the `avi:forge:upgraded:app` event, the Forge Invocation Token attached to the request included a `context` claim with `cloudId`. The token was verified and contained: `app`, `context`, `aud`, `nbf`, `iss`, `iat`, `exp`, `jti`. The `context` field held exactly `{ “cloudId”: “” }`.
For comparison, a UI module token had the same structure plus a `principal` claim.
References:
- https://developer.atlassian.com/platform/forge/remote/essentials/
- https://developer.atlassian.com/platform/forge/runtime-reference/invoke-remote-api/
- RFC-138 states “No changes will occur for triggers, lifecycle events or backends connected to endpoints”, which suggests triggers are expected to carry context.
Filed as Jira