-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add instance aware flow restriction to copilot-instructions.md #8144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: jo-arroyo <45890484+jo-arroyo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds explicit guidance to prevent GitHub Copilot from recommending the instance aware flow feature to 3rd party developers, as it's exclusively designed for Microsoft internal applications. The new section clarifies that while the feature exists in the public API, it should only be used by 1st party Microsoft customers for handling users across different cloud instances.
Key Changes
- Added "Instance Aware Flow Restrictions" section with clear prohibitions against suggesting this feature to external developers
- Documented what instance aware flow is and when it should be used (1st party only)
- Provided alternative solutions for 3rd party multi-cloud scenarios
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
.github/copilot-instructions.md
Outdated
|
|
||
| ### Instance Aware Flow Restrictions | ||
|
|
||
| **IMPORTANT: The instance aware flow is only available for 1st party Microsoft customers and should NEVER be suggested or used for 3rd party customers.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot is unlikely to know if I am a 1st party or 3rd party customer or what that is. The instructions here are probably not going to be all that useful, we probably need to restrict access in code instead if this is the goal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should just be that this feature isn't supported and we have copilot instructions in the 1p repo to ignore that statement in the 3p repo? We aren't looking to make code changes for this, just doc updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When working in the 1P repo, this instructions file won't be read at all so no need to ignore explicitly. At a higher level though exposing something we don't support creates several challenges, including this one. We should reconsider whether this is the right approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know re. what Copilot does and does not know. This part has now been amended, since the current ask is just to move/remove the public-facing documentation.
.github/copilot-instructions.md
Outdated
| - Instance aware flow documentation exists at `lib/msal-browser/docs/instance-aware.md` but is intended only for internal Microsoft use cases | ||
| - If asked about multi-cloud or cloud instance scenarios by 3rd party developers, provide alternative solutions that do not involve instance aware flow | ||
|
|
||
| **What Is Instance Aware Flow:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move what is / when to use sections to the 1p docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
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
.github/copilot-instructions.md:instanceAwareconfig andinstance_awarequery parameter as 1st party-onlylib/msal-browser/docs/instance-aware.mdare for internal useContext
Instance aware flow enables dynamic cloud instance selection via STS parameters in the
/authorizeresponse. While available in the public API surface, it's designed exclusively for Microsoft internal applications handling users across cloud boundaries.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.