Skip to content

Fix: Update token acquisition logic for agentic scenarios#845

Merged
MattB-msft merged 2 commits intomainfrom
users/mbarbour/AgenticIdentityBugFix
Jan 5, 2026
Merged

Fix: Update token acquisition logic for agentic scenarios#845
MattB-msft merged 2 commits intomainfrom
users/mbarbour/AgenticIdentityBugFix

Conversation

@MattB-msft
Copy link
Copy Markdown
Member

Added client_info = 2 for Non User auth scenarios ( entra seems to want this now )

Updated user level acquireTokenByForAgenticScenarios to pass agentAppInstanceID and AgentToken for FIC exchange.

This pull request updates the MsalTokenProvider class to improve how authentication tokens are acquired, particularly for agentic scenarios. The main changes focus on adjusting token request parameters and method signatures to ensure correct handling of authentication flows.

Authentication flow improvements:

  • Added a conditional to include client_info = '2' in the token request payload for all grant types except 'user_fic', ensuring proper client information is provided for most authentication scenarios.

  • Updated the call to acquireTokenByForAgenticScenarios to pass agentAppInstanceId as a parameter instead of instanceToken, aligning the method signature and invocation with agentic authentication requirements.

Added client_info = 2 for Non User auth scearios ( entra seems to want this now )

Updated user level acquireTokenByForAgenticScenarios to pass agentAppInstanceID and AgentToken for FIC exchange.
@MattB-msft
Copy link
Copy Markdown
Member Author

Fix for #834 and issue reported by end user;

@MattB-msft MattB-msft merged commit dd45e8a into main Jan 5, 2026
13 checks passed
@MattB-msft MattB-msft deleted the users/mbarbour/AgenticIdentityBugFix branch January 5, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants