SkybuDocs

Ferdigheter · Tilgang og sikkerhet

Guests and groups

Invite people outside the organisation to one app as guests, remove them, and limit an app to chosen groups from Entra ID or chosen members.

skill://access/guests-and-groupsAgenter leser den med resources/read eller skills_read. Den er skrevet på engelsk, for agentene.

Two ways to change who gets into an app that requires sign-in, whether members-only (skill://access/members-only-apps) or signing people in itself (skill://access/sign-in-with-your-organisation):

  • Guests let someone outside the organisation into one app, until an optional last day.
  • Limits keep an app to members in chosen groups, or chosen members, instead of every member.

Neither applies to a public app. Only owners of the organisation invite, remove and limit; any member can list.

In short

  1. get_app_access: check effective is members or app, and see allowed.
  2. Guests: list_app_guests, invite_app_guest, remove_app_guest.
  3. Groups: list_groups, then set_app_access with signInGroups (and signInPeople).
  4. Narrowing takes effect at each person's next sign-in, not at once.

Guests

Listing

{ "name": "list_app_guests", "arguments": { "appId": "<app id>" } }
[
  { "id": "<guest id>", "email": "konsulent@fjordbit.no", "name": "Kari Nordmann", "expiresAt": "2027-03-31T22:59:59.000Z", "acceptedAt": "2026-11-20T09:12:00.000Z", "createdAt": "…", "invitedBy": "<user id>", "active": true }
]

active is false once the last day has passed. acceptedAt is null until they have accepted or signed in; name is null until they have an account.

Inviting

{ "name": "invite_app_guest", "arguments": { "appId": "<app id>", "email": "konsulent@fjordbit.no", "until": "2027-03-31" } }
{ "id": "<guest id>", "email": "konsulent@fjordbit.no", "until": "2027-03-31T22:59:59.000Z", "emailed": true }
  • until is optional: an ISO date or time. A date means the end of that day, Norwegian time. Leave it out for no end. Ask the user for the last day rather than leaving it open by habit.
  • The guest gets an email with a link that works for 7 days. Inviting the same address again sends a new link and sets the new last day.
  • emailed: false means the email could not be sent; invite again later.
  • Refusals: owner_only, already_member (members get in already), invalid_email, invalid_guest_until (the last day must be in the future).

Through the link the guest accepts with an account they have, signs in with their work account if their email domain uses single sign-on on Skybu, or creates an account with a password of at least 10 characters. There is no two-factor sign-in for guests yet; tell the user if the app holds sensitive data. A guest-only account belongs to no organisation: in the dashboard it sees only the apps it is a guest in.

In the app, a guest looks like a member:

  • members-only: the same x-skybu-user-email and x-skybu-user-name headers;
  • signing in itself: skybu_role is guest and skybu_org is the app's organisation.

So an app that should show guests less must check skybu_role; behind members-only it cannot tell guests apart.

Removing

{ "name": "remove_app_guest", "arguments": { "appId": "<app id>", "guestId": "<guest id>" } }

It answers { "ok": true } and revokes the guest's tokens for the app. After the last day a guest gets no new sign-in, but tokens already given run out on their own: 15 minutes, or up to 12 hours for a refresh token where the owner allows them. Remove the guest when they must be out now.

Limiting an app to groups or people

The groups

Groups come from Entra ID through SCIM, set up by an owner under Settings → Sign-in in the dashboard. List them:

{ "name": "list_groups", "arguments": {} }
[{ "id": "<group id>", "name": "Lønn", "members": 4 }]

An empty list means the organisation sends no groups yet. Groups cannot be made in Skybu; they are managed in Entra ID.

Setting the limit

{ "name": "set_app_access", "arguments": { "appId": "<app id>", "signInGroups": ["<group id>"] } }
ArgumentMeaning
signInGroupsGroup ids from list_groups, at most 50. Members in any of them may sign in.
signInPeopleMember user ids, at most 200, who may sign in besides the groups.
  • Each list replaces the one stored. To add a group, send the old ids and the new one. An argument you leave out is kept as it is.
  • null or [] clears a list. With both cleared, every member may sign in again.
  • Guests still get in; limits apply to members.
  • Previews follow their app.
  • Refusals: owner_only, unknown_sign_in_group, unknown_sign_in_person, invalid_sign_in_groups, invalid_sign_in_people. A group deleted later in Entra ID drops out of the list silently.

get_app_access then shows who is allowed:

{
  "allowed": {
    "groups": [{ "id": "<group id>", "name": "Lønn" }],
    "people": [{ "userId": "<user id>", "email": "kari@nordlys.no", "name": "Kari Nordmann" }]
  }
}

No agent tool lists the organisation's members, so you cannot look up a user id by email. Keep the ids already in allowed.people; to add someone new, ask the user to choose them in the app's Settings tab ("Bare noen i organisasjonen") or run skybu app access <app> --person <email>. The CLI also takes --group <name> and --everyone.

When it takes effect

Skybu checks the limit each time someone signs in. Tokens already given are not revoked:

  • members-only: Skybu's gateway signs people in again within 15 minutes, so someone outside the limit loses the app within that time;
  • an app signing in itself: at its next sign-in. The ID token lasts 15 minutes; a refresh token, where allowed, up to 12 hours.

The same goes for someone taken out of a group in Entra ID. To shut someone out at once, they must be removed from the organisation, which revokes their tokens for all its apps.

Things to know

  • Guests follow the app to its previews: a guest of the app can also open its pull request previews.
  • Every change is in the audit log: app.guest_invited, app.guest_removed, and app.access_limited with the group names and emails before and after.
  • An app that signs people in itself can also ask for the groups scope and decide in code (skill://access/sign-in-with-your-organisation). A limit keeps people out before the app sees them; use both when some groups get in and fewer see the admin pages.