How connections work
- Provider and mode. Set
providertomicrosoftorgoogle. Setmodetoown_app(your own Microsoft Entra app or Google service account) orscreenrig_app(screenRIG's app, approved by a Microsoft 365 administrator or Google account holder). - Status. A
screenrig_appconnection starts inpending_consentuntil someone completes approval. Once valid credentials are stored, its status isready. If Microsoft or Google rejects those credentials, the status changes toerrorwith details inlast_error, and returns toreadyafter the next successful sign-in. Temporary rate limits or provider outages do not change the connection's status. - Write-only secrets. Client secrets, private keys, and refresh tokens are never displayed again after you save them. Reading a connection returns whether a secret is stored along with a non-sensitive hint: the last four characters of a Microsoft client secret or the email address of a Google service account.
- Testing. Running a test authenticates with the provider and saves the result. For Microsoft connections, the test also lists the Microsoft Graph application permissions granted to the sign-in.
- Updating. Updating credentials on an
own_appconnection resets its status toreadyand clearslast_error. Ascreenrig_appconnection can only be renamed—request a new consent link to change the approving account or tenant. - Deleting. Deleting a connection fails with
resource_conflictwhile any data source, Power BI connection, or media sync account still uses it. Deleting a connection in screenRIG does not revoke access on the provider's side: remove screenRIG's enterprise application in Microsoft Entra or revoke the grant in Google Account settings separately. - Limit. An organization can have up to 50 connections across all of its projects.
Choose a mode: your own app vs. screenRIG's app
| Aspect | Your own app (own_app) | screenRIG's app (screenrig_app) |
|---|---|---|
| Credentials you provide | Microsoft: tenant ID or domain, client ID, and client secret. Google: service account JSON key | None—screenRIG generates a one-time consent link |
| Who grants access | You, when registering the app and granting permissions | A Microsoft 365 administrator or Google account holder who opens the link |
| Scope of access | Whatever permissions you grant your app | Microsoft: permissions approved by the admin (which you can restrict further). Google: read-only access to calendars visible to the approving account |
| Power BI | Supported | Not supported—use own_app for Power BI |
Microsoft
Your own app
- Register an application in the Microsoft Entra admin center and create a client secret (copy the secret value, not its ID).
- Assign the required Microsoft Graph application permissions from the table below and grant admin consent.
- Create the connection with:
config.tenant_id: your directory ID or primary domain (common,organizations, andconsumersare rejected).config.client_id: the application (client) ID.secret: the client secret value.
screenRIG's app (admin consent)
Create a connection with mode set to screenrig_app and omit config and secret. The response includes consent_url, a one-time link valid for 24 hours. Send this link only to a Microsoft 365 administrator—it authorizes that consent directly.
- The administrator opens the link and approves screenRIG's app for the tenant.
- Microsoft redirects back to screenRIG and prompts the administrator to sign in to the tenant. The connection records the verified tenant from that sign-in rather than trusting a tenant claimed in a request.
- screenRIG authenticates once using the granted permissions, and the connection moves to
ready.
Link lifecycle and errors:
- Each consent link is single-use. Generating a new link, completing consent, or deleting the connection invalidates any earlier link. You can request a new link at any time to recover a connection in
erroror switch to another tenant. - If the administrator declines or sign-in fails, the connection records
consent_deniedorconsent_failed(including Microsoft'sAADSTScode) and keeps its pending consent so the same link can be retried. - A declined re-consent never disrupts a connection that is already
ready. - If the tenant removes screenRIG's app, the connection reports
consent_revoked—have an administrator approve a new consent link to restore it.
Approval is per tenant, and a tenant connects to one screenRIG organization. The person who signs in is a Global Administrator or Privileged Role Administrator of the tenant; anyone else is refused with consent_failed. Every project of that organization connects the tenant the same way, and another organization connects it with its own Microsoft Entra app. Narrow what the app can read, as below. Deleting the enterprise application in Microsoft Entra ends the access of every project.
Required Microsoft Graph permissions
| Use case | Permission | Notes |
|---|---|---|
| Room calendars | Calendars.Read | Restrict access to a mail-enabled security group of room mailboxes with New-ApplicationAccessPolicy -AccessRight RestrictAccess |
| Room count (optional) | Place.Read.All | Allows a source test to count rooms listed in your organization |
| SharePoint and OneDrive media sync | Sites.Selected | Grant read access per site (POST /v1.0/sites/{site-id}/permissions). Files.Read.All and Sites.Read.All grant tenant-wide access and are not requested |
| Power BI | None for Microsoft Graph | Controlled by Power BI tenant settings and workspace membership |
Testing a connection lists which of these permissions the sign-in holds. The test warns if only Sites.Selected is granted (because each SharePoint site still requires an individual grant) and fails if none of these permissions are present.
Your own app
- Create a service account in Google Cloud, enable the Google Calendar API, and download its JSON key (up to 16 KiB).
- Pass the entire JSON key file as
secretwhen creating the connection; screenRIG validates the file on save. - Grant calendar access in one of two ways:
- Share each room calendar directly with the service account's email address, or
- Enable domain-wide delegation for the service account in the Google Admin console with the scope
https://www.googleapis.com/auth/calendar.events.readonly, and setsubjecton the data source.
screenRIG's app
The consent link opens Google's consent screen for the account holder to grant read-only calendar access (calendar.events.readonly, plus openid and email so screenRIG records which account approved). Unchecking the calendar permission causes consent to fail.
Data sources using this connection can read only the calendars visible to the approving account, so ensure that account has access to every room calendar you configure. Sources using a screenrig_app connection cannot set subject. If Google stops honoring the grant, the connection reports reconnect_required—request a new consent link to reconnect.
Use a connection
- Meeting-room sources. Set
connection_idon amicrosoft365orgoogle_calendardata source instead of inline credentials (tenant,client_id, andclient_secret, orservice_account_key). Bothown_appandscreenrig_appmodes are supported. Inline credentials still work, but you cannot combine them withconnection_id. - SharePoint and OneDrive media sync. Pass
connection_idon a Microsoft 365 sync account instead oftenant_id,client_id, andsecret. - Power BI. Pass the
connection_idof a Microsoftown_appconnection instead of separate tenant, client ID, and secret fields. Because Microsoft does not support cross-tenant apps generating embed tokens for a customer tenant,screenrig_appconnections are rejected for Power BI. A Power BI administrator must still enable service principal access and add the app to each target workspace.
If a referenced connection is missing, still awaiting approval, or belongs to the wrong provider, the data source reports config_invalid. If Microsoft or Google rejects sign-in, the source reports auth_failed and the connection status changes to error.
Create and manage connections
You can manage connections on the dashboard's Connections page (grouped into Needs attention, Waiting for consent, and Ready), with the CLI, or via POST /api/connections.
CLI
screenrig connection create microsoft --mode own_app --tenant-id contoso.com --client-id 0b1d2f3a-4c5e-4f60-8a7b-9c0d1e2f3a4b --secret-file secret.txt
screenrig connection create google --mode screenrig_app --name "Campus rooms"
screenrig connection test pcn_ID
screenrig connection connect pcn_ID
--secret-file and --service-account-key-file read secrets from a file or from standard input (-), never from a command-line argument.
Other CLI commands:
connection listandconnection show: inspect saved connections.connection update: rename a connection or replaceown_appcredentials.connection test: sign in and record the result.connection connect: generate a new consent link.connection delete: remove an unused connection.
API
Create a Microsoft own_app connection (keep secrets in a request file rather than on the command line):
{
"provider": "microsoft",
"mode": "own_app",
"name": "Contoso rooms",
"config": {"tenant_id": "contoso.com", "client_id": "CLIENT_ID"},
"secret": "CLIENT_SECRET_VALUE"
}
Create a Google screenrig_app connection (no config or secret required):
{"provider": "google", "mode": "screenrig_app", "name": "Campus rooms"}
The screenrig_app response returns consent_url and consent_expires_at—send consent_url to the approving administrator or account holder. Use POST /api/connections/ID/connect to issue a new consent link and POST /api/connections/ID/test to test credentials and save the result.
Common errors
connection_app_not_configured: this server has no screenRIG app configured for that provider. Create the connection inown_appmode instead.connection_limit_reached: the organization has reached its limit of 50 connections. Delete an unused connection or reuse an existing one.