You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c8d1881
Browse filesBrowse the repository at this point in the historyBrowse files
title: About Enterprise-Managed Authorization for apps
3
+
allowTitleToDifferFromFilename: true
4
+
shortTitle: About EMA
5
+
intro: 'Apps can sign in with single sign-on to {% data variables.product.github %} using an identity provider (IdP) credential, without an interactive sign-in.'
6
+
versions:
7
+
ghec: '*'
8
+
permissions: Enterprise admins can manage Enterprise-Managed Authorization.
9
+
contentType: concepts
10
+
category:
11
+
- Provision and manage enterprise users
12
+
---
13
+
14
+
> [!NOTE]
15
+
> Enterprise-Managed Authorization is in {% data variables.release-phases.public_preview %} and subject to change. Only select apps can use EMA, and only with OIDC-backed {% data variables.product.prodname_emus %}. To use EMA in your enterprise, you must enable it in both {% data variables.product.github %} and Microsoft Entra.
16
+
17
+
Enterprise-Managed Authorization (EMA) is an emerging [identity standard](https://modelcontextprotocol.io/extensions/auth/enterprise-managed-authorization) that allows an app to access a resource using their IdP sign-in instead of requiring the user to sign in to the resource directly. EMA is also known as ID JAG, cross-app access (XAA), or Agentic SSO depending on which platform you are using. It's most popular in the MCP ecosystem, but useful for any federated setup.
18
+
19
+
The benefits of EMA apply to both developers and administrators:
20
+
21
+
* Developers get easier access to {% data variables.product.github %} from compatible clients. They don't need to configure MCP JSON or complete a separate OAuth flow.
22
+
* Administrators get to see and control the access between apps and {% data variables.product.github %}, providing additional security and auditability support.
23
+
* Client apps receive short-lived, rotating tokens instead of long-lived OAuth app tokens or {% data variables.product.pat_generic_plural %}.
24
+
25
+
## Enabling Enterprise-Managed Authorization in your enterprise
26
+
27
+
Before your users can use EMA, it needs to be enabled in your enterprise. When enabled, it allows your users to access {% data variables.product.github %} from the {% data variables.copilot.copilot_cli_short %} and {% data variables.product.prodname_vscode_shortname %} after signing in to Microsoft Entra, rather than performing an OAuth sign-in against {% data variables.product.github %}. Your enterprise must use {% data variables.product.prodname_emus %} with OpenID Connect (OIDC) single sign-on.
28
+
29
+
{% data reusables.enterprise-accounts.access-enterprise %}
30
+
{% data reusables.enterprise-accounts.identity-provider-tab %}
31
+
1. Select **Enterprise-Managed Authorization** under the **Single sign-on** section.
32
+
1. Set the default access policy to **Enabled** or **Disabled**.
33
+
1. If you want to enable or disable EMA selectively for an enterprise team, user, or role, select **Add override** and pick the target that should receive a different outcome. Then set the policy for the override, either **Enabled** or **Disabled**.
34
+
35
+
In case of multiple overrides applying to a user (for example because they belong to two different teams, each with an override, and are targeted with one directly), the following logic applies:
36
+
37
+
1. If a user is targeted directly with an override, that outcome applies.
38
+
1. Assuming no override directly targets the user, then any applicable override that disables the feature applies, and the user cannot use EMA.
39
+
1. If all applicable overrides enable the feature for the user, they can use EMA.
40
+
1. Finally, if no overrides apply, they are subject to the default policy.
41
+
42
+
## Supported applications
43
+
44
+
{% data variables.copilot.copilot_cli_short %} and {% data variables.product.prodname_vscode_shortname %} support EMA with {% data variables.product.github %}. The latest versions of each app support EMA, but may require configuration to enable the feature in the app. Both apps require configuration in Microsoft Entra to allow the connection to {% data variables.product.github %}.
45
+
46
+
### Enabling sign-in within Microsoft Entra
47
+
48
+
To enable SSO between an app and {% data variables.product.github %} within Microsoft Entra, you must ensure that the client application ({% data variables.product.prodname_vscode_shortname %} or {% data variables.copilot.copilot_cli_short %}) is present in your tenant and allowed to access the **{% data variables.product.prodname_emu_idp_oidc_application %}** application.
49
+
50
+
As a tenant administrator, you must provide admin consent for each application to support the connection.
51
+
52
+
Using your tenant ID or domain name in place of `<TENANT_IDENTIFIER>`, visit each of these URLs and approve the application's access to {% data variables.product.github %}:
53
+
54
+
* For {% data variables.product.prodname_vscode_shortname %}: `https://login.microsoftonline.com/<TENANT_IDENTIFIER>/v2.0/adminconsent?client_id=aebc6443-996d-45c2-90f0-388ff96faa56&scope=12f6db80-0741-4a7e-b9c5-b85d737b3a31/user_impersonation`
55
+
* For {% data variables.copilot.copilot_cli_short %}: `https://login.microsoftonline.com/<TENANT_IDENTIFIER>/v2.0/adminconsent?client_id=5ecc71bb-0fa6-4d6b-a31b-de12184c4b1a&scope=12f6db80-0741-4a7e-b9c5-b85d737b3a31/user_impersonation`
56
+
57
+
The `12f6db80-0741-4a7e-b9c5-b85d737b3a31` GUID included in the scope query parameter is the application ID for the {% data variables.product.prodname_emu_idp_oidc_application %} application. `user_impersonation` is the standard scope that indicates you are signing in as the user. Once within {% data variables.product.github %}, the application's permissions are still enforced and actions are still attributed to the application.
58
+
59
+
When you go through the admin consent flow you'll be asked for two approvals each time: once for the client application accessing {% data variables.product.github %} (called `SPN-GITHUB_MANAGED_USER_OIDC` in the consent dialog), and once for {% data variables.product.github %} having access to your user's data. The user data access was already granted when you first approved the application. This is just Entra running the approval process for all involved applications.
60
+
61
+
You can validate whether the apps were created and approved in your tenant by navigating to the **Enterprise apps** tab of your Entra tenant in the {% data variables.actions.azure_portal %}. There, search for each of the applications by name or application ID, using the **Application ID starts with** filter. Be sure to remove the **Application type** filter or set it to **Microsoft applications** so that the apps appear. The application IDs for each app are:
62
+
63
+
* {% data variables.product.prodname_vscode_shortname %}: `aebc6443-996d-45c2-90f0-388ff96faa56`
64
+
* {% data variables.copilot.copilot_cli_short %}: `5ecc71bb-0fa6-4d6b-a31b-de12184c4b1a`
65
+
66
+
When you have found the apps, open the **Permissions** page in the **Security** section. If the application is present and has been granted access to {% data variables.product.github %}, you should see an entry in the table for **{% data variables.product.prodname_emu_idp_oidc_application %}** and `user_impersonation`, granted through admin consent. If you'd like to remove this access, you can click the three dots to the right of the entry and select **Revoke permission**.
67
+
68
+
### {% data variables.copilot.copilot_cli_short %}
69
+
70
+
To use Enterprise-Managed Authorization with the {% data variables.copilot.copilot_cli_short %}, see [AUTOTITLE](/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli#authenticating-with-microsoft-entra). EMA is enabled in version 1.0.113 and later when you run `/login`.
71
+
72
+
### {% data variables.product.prodname_vscode_shortname %}
73
+
74
+
Starting with version 1.141.0 of {% data variables.product.prodname_vscode_shortname %}, users may see the option to sign in with their Microsoft Entra account. If you do, and your Entra account is linked to an OIDC {% data variables.enterprise.prodname_managed_user %}, you'll get immediate access to {% data variables.product.github %} and your {% data variables.product.prodname_copilot %} entitlements. When you select the Microsoft option, {% data variables.product.prodname_vscode_shortname %} will attempt to sign in using your on-device broker in order to SSO into an Entra account. If it is unable to, you can sign in to Entra via your web browser.
75
+
76
+
#### Enabling Microsoft authentication in {% data variables.product.prodname_vscode_shortname %}
77
+
78
+
{% data variables.product.prodname_vscode_shortname %} may not show the **Continue with Microsoft** option when you are asked to sign in. This may be because the feature is disabled on your {% data variables.product.prodname_vscode_shortname %} instance, or because {% data variables.product.prodname_vscode_shortname %} was unable to detect an existing Microsoft Entra account on the device. To force the feature to be enabled, change the setting.
79
+
80
+
The feature is controlled by the `chat.microsoftAuthentication.enabled` setting, which has one of three values:
81
+
82
+
| Value | Behavior |
83
+
| --- | --- |
84
+
|`"auto"`| Checks whether a Microsoft Entra account is detectable before showing the option. |
85
+
|`"always"`| Always shows the Microsoft sign-in option. |
86
+
|`"never"`| Hides the Microsoft sign-in option. |
87
+
88
+
For example, to always show the option, add this to your `settings.json`:
89
+
90
+
```json
91
+
{
92
+
"chat.microsoftAuthentication.enabled": "always"
93
+
}
94
+
```
95
+
96
+
For help finding and opening `settings.json` in {% data variables.product.prodname_vscode_shortname %}, see ["User and workspace settings" in the {% data variables.product.prodname_vscode_shortname %} documentation](https://code.visualstudio.com/docs/configure/settings#_settings-json-file).
97
+
98
+
The default in version 1.141.0 depends on your telemetry setting:
99
+
100
+
* If telemetry, and therefore A/B experimentation, is enabled, the default is `"auto"`.
101
+
* If telemetry is disabled, the default is `"never"`. Set the value to `"auto"` or `"always"` to opt in manually.
102
+
103
+
In future releases, this setting will default to `"auto"`.
104
+
105
+
### EMA support for other apps and IdPs
106
+
107
+
{% data variables.product.github %} plans to expand EMA support for the full range of client applications and IdPs that implement the protocol, including Okta, Ping, {% data variables.copilot.claude %}, and Cursor. If your {% data variables.enterprise.prodname_emu_enterprise %} uses one of these IdPs, then compatible applications will be able to access {% data variables.product.github %} on your users' behalf.
108
+
109
+
To learn more about Enterprise-Managed Authorization, see the [MCP standard documentation](https://modelcontextprotocol.io/extensions/auth/enterprise-managed-authorization) and the [ID JAG specification](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-identity-assertion-authz-grant). You can follow the [roadmap item](https://github.com/github/roadmap/issues/1338) and [changelog](https://github.blog/changelog/) for updates on this work.
Copy file name to clipboardExpand all lines: content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise.md
+47-24Lines changed: 47 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,27 +26,47 @@ Streaming audit log data has these benefits:
26
26
***Data continuity**. If you pause a stream, it retains a buffer for seven days, so there is no data loss for the first week. If the stream remains paused for more than seven days, it will resume from a point one week prior to the current time. If paused for three weeks or more, the stream won't retain any data and will start anew from the current timestamp.{% endif %}
27
27
***Data retention**. Keep your exported audit logs and Git events data as long as you need to.
28
28
29
-
You can also stream agent session activity from {% data variables.product.prodname_copilot %} to the same destination you use for other enterprise audit events. This is currently in {% data variables.release-phases.public_preview %}. See [AUTOTITLE](/enterprise-cloud@latest/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/monitor-agentic-activity#tracking-agentic-activity-in-your-enterprise-through-the-audit-log) in the {% data variables.product.prodname_ghe_cloud %} documentation.
29
+
You can also stream agent session activity from {% data variables.product.prodname_copilot %} to the same destination you use for other enterprise audit events. This is currently in {% data variables.release-phases.public_preview %}.
30
30
31
31
You can set up{% ifversion pause-audit-log-stream %}, pause,{% endif %} or delete a stream at any time. The stream exports audit and Git events data for all of the organizations in your enterprise, for activity from the time the stream is enabled onwards.
32
32
33
33
All streamed audit logs are sent as compressed JSON files. The filename format is `YYYY/MM/DD/HH/MM/<uuid>.json.log.gz`.
34
34
35
35
>[!NOTE] {% data variables.product.prodname_dotcom %} uses an at-least-once delivery method. Due to certain network or system issues, some events may be duplicated.
36
36
37
+
{% ifversion audit-log-streaming-health-check %}
38
+
39
+
## Health checks for audit log streams
40
+
41
+
Every 24 hours, a health check runs for each stream. If a stream is set up incorrectly, an email will be sent to the enterprise owners. To avoid audit log events being dropped from the stream, a misconfigured stream must be fixed within six days.
42
+
43
+
{% endif %}
44
+
45
+
## Prerequisites
46
+
47
+
If you have data residency requirements, configure your SIEM destination to ingest and store streamed data in the appropriate region before enabling streaming.
48
+
37
49
{% ifversion ghes %}
38
50
39
51
Enabling audit log streaming can cause a minor impact on the performance of {% data variables.location.product_location %}. To learn about increasing resources to mitigate this performance impact, see [AUTOTITLE](/admin/monitoring-and-managing-your-instance/updating-the-virtual-machine-and-physical-resources/increasing-cpu-or-memory-resources).
40
52
41
53
{% endif %}
42
54
43
-
{% ifversion audit-log-streaming-health-check %}
55
+
{% ifversion ghec %}
44
56
45
-
## Health checks for audit log streams
57
+
## Enabling audit log streaming of {% data variables.product.prodname_copilot_short %} agent session events
46
58
47
-
Every 24 hours, a health check runs for each stream. If a stream is set up incorrectly, an email will be sent to the enterprise owners. To avoid audit log events being dropped from the stream, a misconfigured stream must be fixed within six days.
59
+
{% data reusables.copilot.agent-session-streaming-availability-note %}
48
60
49
-
To fix your streaming configuration, follow the steps in [Setting up audit log streaming](#setting-up-audit-log-streaming).
61
+
{% data reusables.enterprise-accounts.access-enterprise %}
62
+
{% data reusables.enterprise-accounts.ai-controls-tab %}
63
+
1. In the sidebar, click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**.
64
+
1. In the "Billing & usage" section, enable the **Copilot Usage Records Streaming** policy.
65
+
1. Configure a streaming destination. See [Setting up audit log streaming](#setting-up-audit-log-streaming).
66
+
67
+
You can also retrieve {% data variables.product.prodname_copilot_short %} usage data through the REST API. To do this, you must enable the **Copilot Usage Records API** policy. See [AUTOTITLE](/rest/copilot/copilot-usage-metrics#get-copilot-usage-records-for-an-enterprise).
68
+
69
+
For help interpreting the audit log events for agentic activity, see [AUTOTITLE](/copilot/reference/enterprise-administrators/agentic-audit-log-events#streaming-audit-log-events).
50
70
51
71
{% endif %}
52
72
@@ -59,7 +79,8 @@ To set up the audit log stream, follow the instructions for your provider:
@@ -272,6 +293,25 @@ To set up streaming to Google Cloud Storage, create a service account in Google
272
293
273
294
{% ifversion ghec %}
274
295
296
+
### Setting up streaming to Microsoft Agent 365
297
+
298
+
{% data reusables.copilot.agent-session-streaming-availability-note %}
299
+
300
+
Microsoft Agent 365 only supports streaming {% data variables.product.prodname_copilot_short %} agent session events.
301
+
302
+
First, enable audit log streaming of {% data variables.product.prodname_copilot_short %} agent sessions. See [Enabling audit log streaming of {% data variables.product.prodname_copilot_short %} agent session events](#enabling-audit-log-streaming-of-copilot-agent-session-events) above.
303
+
304
+
Next, configure streaming in {% data variables.product.github %} and sign in to Microsoft Entra to authorize the connection:
305
+
306
+
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
307
+
1. Select the **Configure stream** dropdown, then click **Microsoft Agent 365**.
308
+
1. Click **Authorize with Microsoft Entra**.
309
+
1. Sign in with a Microsoft Entra account for your tenant and authorize the {% data variables.product.github %} app.
310
+
1. Choose how much {% data variables.product.prodname_copilot_short %} activity data to share with this Microsoft Agent 365 connection. This setting applies only to this connection. Other streams are not affected.
311
+
312
+
* **Include raw content** is selected by default. This content includes prompts, responses, tool inputs and results, and client addresses.
313
+
* If you turn off **Include raw content**, only activity metadata is shared, such as dates, model names, token counts, and tool names.
314
+
275
315
### Setting up streaming to Microsoft Purview
276
316
277
317
{% data reusables.copilot.agent-session-streaming-availability-note %}
@@ -280,7 +320,7 @@ Microsoft Purview only supports streaming {% data variables.product.prodname_cop
280
320
281
321
To set up streaming to Microsoft Purview, configure streaming in {% data variables.product.github %}, then authorize access through Microsoft Entra.
282
322
283
-
1. Configure streaming in {% data variables.product.github %}. See [Enabling audit log streaming of {% data variables.product.prodname_copilot_short %} agent session events](#enabling-audit-log-streaming-of-copilot-agent-session-events) below.
323
+
1. Configure streaming in {% data variables.product.github %}. See [Enabling audit log streaming of {% data variables.product.prodname_copilot_short %} agent session events](#enabling-audit-log-streaming-of-copilot-agent-session-events) above.
284
324
{% data reusables.enterprise.navigate-to-log-streaming-tab %}
285
325
1. Select the **Configure stream** dropdown and click **Microsoft Purview**.
286
326
1. Click **Authorize with Entra**.
@@ -351,20 +391,3 @@ To restart streaming, click **Resume stream**.
351
391
1. Click **Save**.
352
392
353
393
{% endif %}
354
-
355
-
{% ifversion ghec %}
356
-
357
-
## Enabling audit log streaming of {% data variables.product.prodname_copilot_short %} agent session events
358
-
359
-
{% data reusables.copilot.agent-session-streaming-availability-note %}
360
-
361
-
{% data reusables.enterprise-accounts.access-enterprise %}
362
-
1. At the top of the page, click AI Controls
363
-
1. Under "Copilot", select **Enabled everywhere** for "Copilot Usage Records Streaming"
364
-
1. Configure a streaming destination. See [Setting up audit log streaming](#setting-up-audit-log-streaming).
365
-
366
-
You can also retrieve {% data variables.product.prodname_copilot_short %} usage data through the REST API by selecting **Enabled everywhere** for "Copilot Usage Records API". See [AUTOTITLE](/rest/copilot/copilot-usage-metrics#get-copilot-usage-records-for-an-enterprise).
367
-
368
-
For help interpreting the audit log events for agentic activity, see [AUTOTITLE](/copilot/reference/enterprise-administrators/agentic-audit-log-events#streaming-audit-log-events).
0 commit comments