ChatGPT, Claude & Co: Private Accounts im Unternehmen mit Entra Internet Access Custom Headers blockieren
Shadow AI - das Thema, welches in jedem Kundengespräch auftaucht
Nachdem wir in unserer Rolle als Consultants mittlerweile in nahezu jedem Security-Workshop früher oder später bei derselben Frage landen, nämlich „wie verhindern wir eigentlich, dass unsere Mitarbeiter Firmendaten in ihr privates ChatGPT kopieren?”, war es an der Zeit, diesem Thema einen eigenen Post zu widmen. Die Ausgangslage ist dabei fast immer dieselbe: das Unternehmen hat vielleicht schon einen offiziellen Business- oder Enterprise-Workspace lizenziert (oder setzt auf Copilot), parallel dazu nutzen aber zahlreiche Mitarbeiter ihre privaten Accounts bei ChatGPT, Claude & Co, weil diese schlicht schneller verfügbar, „gewohnt” oder einfach schon im Browser eingeloggt sind.
Lange Zeit gab es im Microsoft-Stack für genau dieses Problem keine wirklich saubere Lösung, denn das komplette Blockieren der Domains trifft eben auch den lizenzierten Firmenworkspace. Mit den neuen Custom Headers in Entra Internet Access (EIA) hat sich das nun geändert, und ich habe das Feature in meinem Lab-Tenant auf einer Test-VM ausprobiert.
Was euch in diesem Post erwartet:
- warum private LLM-Accounts ein echtes Risiko sind & nicht nur ein Compliance-Thema
- wie „Tenant Restrictions” für Cloud-LLMs technisch funktionieren
- die Konfiguration in EIA am Beispiel von ChatGPT
- der Live-Test & die Stolpersteine, welche man kennen sollte
Warum ist das nun aber ein Problem?
Das bekannteste Beispiel ist wohl nach wie vor Samsung, wo im Frühjahr 2023 Mitarbeiter internen Source Code und Meetingprotokolle in ChatGPT kopiert haben, worauf das Unternehmen die Nutzung kurzerhand komplett untersagt hat. Seitdem hat sich die Technologie zwar massiv weiterentwickelt, das grundlegende Problem ist jedoch dasselbe geblieben, und in unseren Projekten sehen wir typischerweise folgende Risiken:
- Keine vertragliche Grundlage: für einen privaten Account existiert kein AVV (Auftragsverarbeitungsvertrag nach Art. 28 DSGVO), womit jede Eingabe personenbezogener Daten (Kundendaten, Bewerbungen, HR-Themen) de facto eine unzulässige Übermittlung an einen Dritten darstellt
- Training & Aufbewahrung: bei Consumer-Accounts entscheidet je nach Anbieter und Einstellung der User selbst, ob seine Eingaben für das Training verwendet werden, und die Aufbewahrungsdauer liegt komplett außerhalb der Kontrolle des Unternehmens
- Keine Sichtbarkeit: weder Audit Logs noch eDiscovery, DLP oder Retention greifen, d.h. das Unternehmen weiß schlicht nicht, welche Daten das Haus verlassen haben
- Offboarding: verlässt ein Mitarbeiter das Unternehmen, nimmt er seinen Account samt kompletter Chathistorie (und allen hochgeladenen Dokumenten) einfach mit
- Account-Sicherheit: private Accounts sind selten mit Phishing-resistenter MFA geschützt, und ein kompromittierter Account liefert einem Angreifer in diesem Fall eine sehr gut sortierte Sammlung an Firmeninterna
Ein generelles Verbot ist meiner Ansicht nach jedoch keine Lösung, nachdem es in der Praxis lediglich dazu führt, dass die Nutzung auf das private Smartphone ausweicht. Der sinnvollere Weg ist daher, ein offizielles Tool bereitzustellen und gleichzeitig technisch sicherzustellen, dass im Firmennetz bzw. auf Firmengeräten NUR dieses eine Tool mit dem Firmenworkspace funktioniert.
Tenant Restrictions für LLMs - wie funktioniert das?
Das Prinzip ist aus der Microsoft-Welt bereits seit Jahren bekannt (Tenant Restrictions v1 & v2): ein Proxy fügt in jeden Request an den Dienst einen zusätzlichen HTTP-Header ein, welcher die erlaubten Tenant- bzw. Workspace-IDs enthält, und der Dienst selbst lehnt anschließend jeden Login in einen Workspace ab, welcher nicht auf dieser Liste steht. Mittlerweile unterstützen auch die großen LLM-Anbieter genau diesen Mechanismus:
| Dienst | Header | Wert | Voraussetzung |
|---|---|---|---|
| ChatGPT | ChatGPT-Allowed-Workspace-Id | Workspace-ID(s), kommagetrennt ohne Leerzeichen | Business- bzw. Enterprise-Workspace |
| Claude | anthropic-allowed-org-ids | Organization-ID(s), kommagetrennt ohne Leerzeichen | Enterprise-Plan oder Console-Organisation |
Zusätzlich funktioniert das Ganze auch für GitHub (inklusive Copilot), Google Workspace, Slack, Dropbox und YouTube, die vollständige Liste der Header findet ihr in der Microsoft-Doku. Wichtig ist dabei, dass der Header nur in entschlüsselten Traffic eingefügt werden kann, d.h. ohne TLS-Inspektion funktioniert keiner dieser Mechanismen.
Custom Headers in Entra Internet Access
Genau hier setzen die Custom Headers in EIA an, welche seit September in der Doku stehen und als Option innerhalb einer Web Filtering Policy (v2) umgesetzt sind. Global Secure Access fügt die Header dabei auf Service-Ebene ein, wodurch der User diese auf seinem Gerät weder sehen noch entfernen oder verändern kann, was gegenüber klassischen Browser-Extensions oder Registry-basierten Lösungen ein klarer Vorteil ist.
Die Voraussetzungen im Überblick:
- EIA ist onboarded & das Internet Access Traffic Forwarding Profile aktiv
- der GSA Client ist auf den Geräten installiert (alternativ Remote Network oder Explicit Forward Proxy, siehe meinen Artikel zum Explicit Forward Proxy)
- TLS-Inspektion ist konfiguriert & das Root-Zertifikat auf den Geräten vertrauenswürdig
- die Workspace- bzw. Organization-ID des Firmenworkspaces liegt vor
Konfiguration Schritt für Schritt
1. Workspace-ID ermitteln. Bei ChatGPT findet man die ID in der OpenAI Admin Console unter Workspace settings, bei Claude unter Organization settings > Organization ganz unten.
2. TLS-Inspektion für die Ziel-Domains. Unter Global Secure Access > Secure > TLS inspection policies entweder eine bestehende Policy verwenden oder, wie in meinem Fall, eine eigene Policy mit einer Regel für *.chatgpt.com, chatgpt.com und der Aktion Inspect anlegen. Die automatisch erstellten Bypass-Regeln (System Bypass & Recommended Bypass) können dabei bestehen bleiben.
3. Web Filtering Policy (v2) mit Custom Header anlegen. Unter Global Secure Access > Secure > Web content filtering policies eine neue Policy erstellen, danach unter Rules > Add rule die Destination eintragen, die Rule Action auf Allow belassen und über Configure custom headers den Header ChatGPT-Allowed-Workspace-Id mit der Workspace-ID als Wert hinzufügen. In meinem Test reichte als Destination bereits chatgpt.com, Microsoft empfiehlt in der Doku jedoch *.chatgpt.com, chatgpt.com, was ich für den produktiven Einsatz auch so übernehmen würde. Für jeden weiteren Dienst (z.B. Claude) wird eine eigene Rule angelegt.
4. Policies mit einem Security Profile verknüpfen. Hier gibt es grundsätzlich zwei Varianten. In meinem Lab habe ich beide Policies (TLS Inspection & Web Filtering) direkt im Baseline Profile verlinkt, welches für den gesamten Internet-Traffic inklusive Remote Networks gilt und keine Conditional Access Policy benötigt, womit der Header ohne weitere Zuweisung für alle User greift. Alternativ wird ein eigenes Security Profile angelegt (Link policies > Existing Web Filtering Policy (V2)) und über eine Conditional Access Policy mit dem Target „All internet resources with Global Secure Access” und der Session Control „Use Global Secure Access security profile” zugewiesen, was sich vor allem für einen gestaffelten Rollout mit einer Pilotgruppe anbietet. In beiden Fällen kann pro Security Profile nur eine V2-Policy verlinkt werden.
Wird ein neues Security Profile über Conditional Access zugewiesen, kann es laut Microsoft bis zu 60-90 Minuten dauern, bis es greift, Änderungen an bestehenden Profilen wirken dagegen nahezu in Echtzeit. Wer also nach fünf Minuten testet und sich wundert, sollte einfach noch etwas Geduld haben.
Der Live-Test
Auf der Test-VM mit GSA Client habe ich anschließend versucht, mich mit meinem privaten ChatGPT-Account anzumelden, und das Ergebnis ist genau das, was man sich wünscht:
Der Wechsel in den erlaubten Business-Workspace funktioniert dagegen ganz normal, und zwar ohne dass der User von der Einschränkung überhaupt etwas mitbekommt:
In den Traffic Logs (Monitor > Traffic logs > Transactions) lässt sich über die Spalte Custom Headers zusätzlich nachvollziehen, bei welchen Transaktionen der Header tatsächlich eingefügt wurde, was für das Troubleshooting sehr hilfreich ist.
Stolpersteine aus der Praxis
Ganz so einfach, wie es sich in der Konfiguration anfühlt, ist es in der Praxis jedoch nicht, und folgende Punkte sollte man vor einem Rollout auf jeden Fall bedenken:
- Desktop- & Mobile-Apps: OpenAI weist darauf hin, dass die ChatGPT Apps Certificate Pinning verwenden, wodurch TLS-Inspektion und damit der Header dort nur mit entsprechenden Ausnahmen per MDM funktioniert. Für Claude listet Anthropic Web, Desktop, API Keys und OAuth als abgedeckt.
- QUIC & DNS over HTTPS: nachdem EIA aktuell weder QUIC (UDP 443) noch Secure DNS unterstützt, sollten beide deaktiviert bzw. blockiert werden, da der Traffic ansonsten am Tunnel vorbeilaufen kann
- Nur verwaltete Geräte: der Schutz greift ausschließlich dort, wo der Traffic über GSA läuft, d.h. BYOD-Geräte und das private Smartphone im Mobilfunknetz bleiben außen vor. Daher sollte der Firmenworkspace selbst zusätzlich über Conditional Access abgesichert sein (SSO über Entra ID).
- Fehlkonfiguration: ein fehlerhafter Header-Wert führt bei ChatGPT zu einem 400 für ALLE Requests, d.h. auch der Firmenworkspace ist dann nicht mehr erreichbar. Testen vor dem breiten Rollout ist hier Pflicht.
- Lizenz des Firmenworkspaces: der Header schützt nur dann, wenn es einen offiziellen Workspace gibt, auf welchen man die User umlenken kann, bei Claude etwa erst ab dem Enterprise-Plan
- Die übrigen Tools: Gemini, DeepSeek, Perplexity & Co werden durch die beiden Header natürlich nicht erfasst, hier hilft die Web-Kategorie „Generative AI” in einer Block-Regel, kombiniert mit Allow-Regeln für die freigegebenen Dienste. Entra-Tenants selbst schränkt man übrigens nicht über Custom Headers ein, sondern über Universal Tenant Restrictions.
Fazit
Custom Headers in Entra Internet Access schließen meiner Ansicht nach eine Lücke, welche viele unserer Kunden schon sehr lange beschäftigt, nämlich die Möglichkeit, LLMs offiziell zu erlauben und gleichzeitig die Nutzung privater Accounts technisch zu unterbinden, und das ohne zusätzlichen Proxy eines Drittanbieters. Die Konfiguration ist überschaubar, die eigentliche Arbeit liegt aber wie so oft in den Voraussetzungen: TLS-Inspektion muss sauber ausgerollt sein, der GSA Client auf allen relevanten Geräten laufen und vor allem muss es einen offiziellen Workspace geben, welchen die Mitarbeiter auch tatsächlich nutzen wollen.
Für alle, welche EIA bereits im Einsatz haben, ist das definitiv ein Quick Win, und für alle anderen vielleicht ein guter Grund, sich das Thema Global Secure Access genauer anzusehen. Falls ihr Fragen zur Umsetzung habt oder eure Erfahrungen teilen wollt, meldet euch gerne bei mir.
Shadow AI - the topic that comes up in every customer conversation
Since we as consultants end up with the same question in almost every security workshop sooner or later, namely “how do we actually prevent our employees from copying company data into their personal ChatGPT?”, it was time to dedicate a post to this topic. The starting point is almost always the same: the company may already have licensed an official Business or Enterprise workspace (or relies on Copilot), but at the same time many employees keep using their personal accounts with ChatGPT, Claude & Co, simply because they are available faster, “familiar” or already signed in in the browser.
For a long time there was no really clean solution for exactly this problem in the Microsoft stack, because blocking the domains entirely also hits the licensed corporate workspace. With the new custom headers in Entra Internet Access (EIA) this has now changed, and I tried the feature out in my lab tenant on a test VM.
What to expect in this post:
- why personal LLM accounts are a real risk & not just a compliance topic
- how “tenant restrictions” for cloud LLMs work technically
- the configuration in EIA using ChatGPT as an example
- the live test & the pitfalls you should know about
So why is this a problem?
The best-known example is probably still Samsung, where employees copied internal source code and meeting notes into ChatGPT in spring 2023, after which the company banned its use altogether. The technology has evolved massively since then, but the underlying problem has stayed the same, and in our projects we typically see the following risks:
- No contractual basis: for a personal account there is no DPA (data processing agreement under Art. 28 GDPR), which means that every input of personal data (customer data, job applications, HR topics) is effectively an unlawful transfer to a third party
- Training & retention: with consumer accounts, depending on the provider and settings, the user decides whether their inputs are used for training, and the retention period is completely outside the company’s control
- No visibility: neither audit logs nor eDiscovery, DLP or retention apply, i.e. the company simply doesn’t know which data has left the building
- Offboarding: when an employee leaves the company, they simply take their account with them, including the complete chat history (and all uploaded documents)
- Account security: personal accounts are rarely protected with phishing-resistant MFA, and a compromised account then hands an attacker a very well-sorted collection of company internals
In my view, however, a general ban is not a solution, since in practice it only shifts usage to the personal smartphone. The more sensible approach is therefore to provide an official tool and at the same time ensure technically that on the corporate network or on corporate devices ONLY this one tool works, and only with the corporate workspace.
Tenant restrictions for LLMs - how does that work?
The principle has been known from the Microsoft world for years (tenant restrictions v1 & v2): a proxy injects an additional HTTP header into every request to the service, which contains the allowed tenant or workspace IDs, and the service itself then rejects every sign-in to a workspace that is not on that list. By now the big LLM providers support exactly this mechanism as well:
| Service | Header | Value | Requirement |
|---|---|---|---|
| ChatGPT | ChatGPT-Allowed-Workspace-Id | Workspace ID(s), comma-separated without spaces | Business or Enterprise workspace |
| Claude | anthropic-allowed-org-ids | Organization ID(s), comma-separated without spaces | Enterprise plan or Console organization |
The same approach also works for GitHub (including Copilot), Google Workspace, Slack, Dropbox and YouTube, and you can find the full list of headers in the Microsoft documentation. It is important to note that the header can only be injected into decrypted traffic, i.e. none of these mechanisms work without TLS inspection.
Custom headers in Entra Internet Access
This is exactly where custom headers in EIA come in, which have been in the documentation since September and are implemented as an option within a web filtering policy (v2). Global Secure Access injects the headers at the service layer, so users can neither see nor remove or modify them on their device, which is a clear advantage over classic browser extensions or registry-based solutions.
The prerequisites at a glance:
- EIA is onboarded & the Internet Access traffic forwarding profile is active
- the GSA client is installed on the devices (alternatively a remote network or the explicit forward proxy, see my article on the explicit forward proxy)
- TLS inspection is configured & the root certificate is trusted on the devices
- you have the workspace or organization ID of the corporate workspace
Configuration step by step
1. Get the workspace ID. For ChatGPT you find the ID in the OpenAI admin console under Workspace settings, for Claude at the very bottom of Organization settings > Organization.
2. TLS inspection for the target domains. Under Global Secure Access > Secure > TLS inspection policies, either use an existing policy or, as in my case, create a dedicated policy with a rule for *.chatgpt.com, chatgpt.com and the action Inspect. The automatically created bypass rules (system bypass & recommended bypass) can stay in place.
3. Create a web filtering policy (v2) with a custom header. Under Global Secure Access > Secure > Web content filtering policies, create a new policy, then under Rules > Add rule enter the destination, leave the rule action at Allow and add the header ChatGPT-Allowed-Workspace-Id with the workspace ID as its value via Configure custom headers. In my test, chatgpt.com alone was already enough as the destination, but Microsoft recommends *.chatgpt.com, chatgpt.com in the documentation, which I would also adopt for production use. Each additional service (e.g. Claude) gets its own rule.
4. Link the policies to a security profile. There are basically two options here. In my lab I linked both policies (TLS inspection & web filtering) directly in the baseline profile, which applies to all internet traffic including remote networks and doesn’t need a Conditional Access policy, so the header applies to all users without any further assignment. Alternatively, you create a dedicated security profile (Link policies > Existing Web Filtering Policy (V2)) and assign it via a Conditional Access policy with the target “All internet resources with Global Secure Access” and the session control “Use Global Secure Access security profile”, which is especially useful for a staged rollout with a pilot group. In both cases only one V2 policy can be linked per security profile.
If a new security profile is assigned via Conditional Access, it can take up to 60-90 minutes to take effect according to Microsoft, while changes to existing profiles apply almost in real time. So if you test after five minutes and are wondering why nothing happens, just be a little patient.
The live test
On the test VM with the GSA client, I then tried to sign in with my personal ChatGPT account, and the result is exactly what you want:
Switching to the allowed Business workspace, on the other hand, works completely normally, without the user even noticing the restriction:
In the traffic logs (Monitor > Traffic logs > Transactions) you can additionally use the Custom Headers column to see in which transactions the header was actually injected, which is very helpful for troubleshooting.
Pitfalls from practice
In practice, however, it is not quite as simple as the configuration makes it feel, and you should definitely consider the following points before a rollout:
- Desktop & mobile apps: OpenAI points out that the ChatGPT apps use certificate pinning, so TLS inspection and therefore the header only work there with corresponding exceptions via MDM. For Claude, Anthropic lists web, desktop, API keys and OAuth as covered.
- QUIC & DNS over HTTPS: since EIA currently supports neither QUIC (UDP 443) nor secure DNS, both should be disabled or blocked, otherwise traffic can bypass the tunnel
- Managed devices only: the protection only applies where traffic runs through GSA, i.e. BYOD devices and the personal smartphone on the mobile network remain out of scope. The corporate workspace itself should therefore additionally be protected via Conditional Access (SSO via Entra ID).
- Misconfiguration: an incorrect header value leads to a 400 for ALL requests in ChatGPT, i.e. the corporate workspace is no longer reachable either. Testing before a broad rollout is mandatory here.
- License of the corporate workspace: the header only protects you if there is an official workspace to redirect users to, which for Claude means the Enterprise plan
- The remaining tools: Gemini, DeepSeek, Perplexity & Co are of course not covered by the two headers, and this is where the “Generative AI” web category in a block rule helps, combined with allow rules for the approved services. Entra tenants themselves, by the way, are not restricted via custom headers but via universal tenant restrictions.
Conclusion
In my view, custom headers in Entra Internet Access close a gap that has kept many of our customers busy for a very long time, namely the ability to officially allow LLMs while technically preventing the use of personal accounts, and that without an additional third-party proxy. The configuration is manageable, but as so often the actual work lies in the prerequisites: TLS inspection has to be rolled out properly, the GSA client has to run on all relevant devices and, above all, there has to be an official workspace that employees actually want to use.
For everyone who already runs EIA, this is definitely a quick win, and for everyone else maybe a good reason to take a closer look at Global Secure Access. If you have questions about the implementation or want to share your experiences, feel free to reach out.