-
Notifications
You must be signed in to change notification settings - Fork 22
Add trace level logging to logger and move credential logic to tokenmanager #392
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 10, 2025
b6f81e7 to
10057f5
Compare
09dd84d to
8d2a8fa
Compare
10057f5 to
df2078a
Compare
8d2a8fa to
3cd4667
Compare
rido-min
approved these changes
Nov 11, 2025
Jesperholmbergmsft
approved these changes
Nov 11, 2025
df2078a to
892a823
Compare
c83db7f to
96da7e8
Compare
lilyydu
approved these changes
Nov 11, 2025
packages/apps/src/token-manager.ts
Outdated
| const LOG_LEVEL_TO_MSAL_LOG_LEVEL: Record<LogLevel, MSALLogLevel> = { | ||
| 'error': MSALLogLevel.Error, | ||
| 'warn': MSALLogLevel.Warning, | ||
| 'info': MSALLogLevel.Warning,// MSAL logs are noisy, so we if logging is set to info, we set msal logging to warning |
Contributor
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.
nit: typo
1389155 to
db8807e
Compare
96da7e8 to
1e5a305
Compare
heyitsaamir
added a commit
that referenced
this pull request
Nov 12, 2025
This PR introduces MSAL as a dependency and switches our supported bot authentication to use it. It also includes support for User Managed Identity support and FIC such that we don't need to provide custom code to do that anymore as we had previously suggested. Instead, we can do that simply by the environment variables. | CLIENT_ID | CLIENT_SECRET | MANAGED_IDENTITY_CLIENT_ID | Output | |-|-|-|-| | not_set | | | No-Auth | | set | set | | SecretsAuth | | set | not_set | | User Managed Identity Auth | | set | not_set | set (same as CLIENT_ID) | User Managed Identity Auth | | set | not_set | set (diff from CLIENT_ID) | FIC (user managed identity) | | set | not_set | "system" | FIC (system identity) | Changes to note: 1. We are now no longer _proactively_ refreshing tokens. Instead, we put the token fetcher inside the token resolver logic for the client. This ends up being a call to `tokenManager.getBotToken`. 2. This fixes a bug where proactive scenarios were going to fail because we weren't refreshing the token for them. For reactive scenarios, we refresh the token when the request comes in, so it was fine. 3. We are deprecating the `id` and `name` fields because those used to depend on the token being present. Now that we are not proactively fetching the token, those are not as useful (or reliable). For now, I have chosen to simply use the value from the manifest to populate them. I don't think these fields were that useful anyway, so opting to deprecate. 4. Removes graphToken from being injected into plugins. Plugins weren't using it, and we want to remove tight dependency on graph package. #### PR Dependency Tree * **PR #387** 👈 * Merged #388, #389, #392 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds trace level to our logger, and also passes in logging options to MSAL. And moves credential creation logic to TokenManager.
PR Dependency Tree
This tree was auto-generated by Charcoal