Repository navigation
Dotnet A365 Agent fails - no such type MsalUserAuthorization #167
Description
Activity
rahuldevikar761 commented
on Feb 3, 2026 CollaboratorMore actionsHi Graeme (@graemefoster) Thanks for reporting this. There has been newer changes to the Agent sample and would appreciate if you can pull the latest and try out.
Rahul Devikar (@rahuldevikar761) have pulled the latest. Sample runs, but when I follow instructions to switch to OBO auth (running locally in playground), it breaks with the same error:
System.InvalidOperationException: Type 'MsalUserAuthorization' not found in Assembly 'Microsoft.Agents.Builder' or is the wrong type for 'me'.Rahul Devikar (@rahuldevikar761) definitely getting further.
I can see agent lifecycle notification events come to me agent. But when I address the agent directly in teams my agent is not called.
I tried to add some deliberate calls out to teams and spotted invalid_grant errors in the calls to get tokens.
Fwiw everything works fine in the agent playground. I get the errors when running the agent behind a dev tunnel against my real o365 environment.
@rahuldevikar761 have pulled the latest. Sample runs, but when I follow instructions to switch to OBO auth (running locally in playground), it breaks with the same error:
System.InvalidOperationException: Type 'MsalUserAuthorization' not found in Assembly 'Microsoft.Agents.Builder' or is the wrong type for 'me'.Same here. My current guess is that the type 'MsalUserAuthorization' never exist and is purely fictional.
For the first thing, I have searched in the entire Agents-for-net repo (the source for Microsoft.Agents.Builder and Microsoft.Agents.Authentication.Msal) for MsalUserAuthorization returned no files found.
Secondly, UserAuthorizationModuleLoader.cs only hardcodes 3 types and MsalUserAuthorization is not one of them. The source at Agents-for-net/.../UserAuth/UserAuthorizationModuleLoader.cs (lines 50–61) has explicit else if branches for exactly:
- AzureBotUserAuthorization
- AgenticUserAuthorization
- ConnectorUserAuthorization
Could you please reopen this issue so that someone could take a look? Graeme (@graemefoster) Rahul Devikar (@rahuldevikar761)
Also, including the author of the original PR (#132) here for consulting, abdulanu0 . Thanks.
Any updates on this?
Describe the bug
The dotnet Microsoft Agent framework agent fails to run. It starts, but quickly fails as there is no such type as 'MsalUserAuthorization' (in the a365 Agent Playground)
To Reproduce
Steps to reproduce the behavior:
Run the dotnet agent in the A365 playground. Observe above error.
Screenshots
Environment (please complete the following information):