Skip to content

Commit c87be73

Browse files
Copilotjo-arroyoCopilot
authored
Add instance aware flow restriction to copilot-instructions.md (#8144)
Instance aware flow is a 1st party-only feature that should not be suggested to 3rd party customers. This PR adds explicit guidance to prevent Copilot from recommending it incorrectly. ## Changes - **New section "Instance Aware Flow Restrictions"** in `.github/copilot-instructions.md`: - Marks `instanceAware` config and `instance_aware` query parameter as 1st party-only - Prohibits suggesting this feature for 3rd party applications - Clarifies existing docs at `lib/msal-browser/docs/instance-aware.md` are for internal use - Provides alternative solutions for 3rd party multi-cloud scenarios (standard flows, proper authority config, separate app registrations) ## Context Instance aware flow enables dynamic cloud instance selection via STS parameters in the `/authorize` response. While available in the public API surface, it's designed exclusively for Microsoft internal applications handling users across cloud boundaries. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > Please create a PR for me that updates the "copilot-instructions.md" file that states that the instance aware flow is only available for 1st party customers, and not to suggest or use instance aware for 3rd party customers. Please use the instructions located at .github/copilot-instructions.md for the PR. </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jo-arroyo <45890484+jo-arroyo@users.noreply.github.com> Co-authored-by: Jo Arroyo <joarroyo@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c2ff4da commit c87be73

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,19 @@ microsoft-authentication-library-for-js/
190190
- Write unit tests for new functionality and bug fixes
191191
- Document all public API changes
192192

193+
### Instance Aware Flow Restrictions
194+
195+
**IMPORTANT: The instance aware flow is not supported and should NEVER be suggested or used with this library**
196+
197+
- **Do not suggest** the `instanceAware` configuration option or `instance_aware` query parameter
198+
- **Do not recommend** instance aware flow in code examples, documentation, or solutions
199+
- If asked about multi-cloud or cloud instance scenarios, provide alternative solutions that do not involve instance aware flow
200+
201+
**What to Suggest Instead:**
202+
- Standard MSAL authentication flows without instance aware configuration
203+
- Proper authority configuration for the specific cloud environment the application targets
204+
- Separate application registrations for different cloud environments if needed
205+
193206
### Telemetry and Performance Monitoring
194207

195208
**IMPORTANT: Add telemetry for any new operations or significant code paths in msal-browser and msal-common where observability would be useful.**

0 commit comments

Comments
 (0)