Skip to content
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

WithManagedIdentity is experimental and not exist in Microsoft.Identity.Client 4.51.0 #6643

Closed
xieofxie opened this issue Jun 8, 2023 · 2 comments · Fixed by #6686
Closed
Assignees

Comments

@xieofxie
Copy link
Contributor

xieofxie commented Jun 8, 2023

@mit2nil
Copy link
Member

mit2nil commented Aug 18, 2023

Is there any update on this? It broke our app. This support was indeed removed in 4.51.0 version of msal library.
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/releases

Our production code is failing with following exception now.

System.AggregateException: Failed to acquire token for client credentials. (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.) (Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.)
---> System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)
--- End of inner exception stack trace ---
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.GetTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.AppCredentials.GetTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.AppCredentials.ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Bot.Connector.Conversations.SendToConversationWithHttpMessagesAsync(String conversationId, Activity activity, Dictionary2 customHeaders, CancellationToken cancellationToken) at Microsoft.Bot.Connector.ConversationsExtensions.SendToConversationAsync(IConversations operations, String conversationId, Activity activity, CancellationToken cancellationToken) at Microsoft.Bot.Builder.CloudAdapterBase.SendActivitiesAsync(ITurnContext turnContext, Activity[] activities, CancellationToken cancellationToken) at Microsoft.Bot.Builder.TurnContext.<>c__DisplayClass31_0.<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.Bot.Builder.TranscriptLoggerMiddleware.<>c__DisplayClass3_0.<<OnTurnAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.Bot.Builder.TurnContext.SendActivityAsync(IActivity activity, CancellationToken cancellationToken) at Microsoft.Azure.Support.Copilot.Bot.AdapterWithErrorHandler.SendErrorMessageAsync(ITurnContext turnContext, Exception exception) in C:\__w\1\s\src\Services\Copilot\Copilot.Bot\AdapterWithErrorHandler.cs:line 68 ---> (Inner Exception #1) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'. at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh) at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.<GetTokenAsync>b__0() at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func`3 retryExceptionHandler)<---

---> (Inner Exception #2) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #3) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #4) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #5) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #6) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #7) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #8) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #9) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

---> (Inner Exception #10) System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder Microsoft.Identity.Client.AcquireTokenForClientParameterBuilder.WithManagedIdentity(System.String)'.
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.AcquireTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.ManagedIdentityAuthenticator.<>c__DisplayClass6_0.b__0()
at Microsoft.Bot.Connector.Authentication.Retry.Run[TResult](Func1 task, Func3 retryExceptionHandler)<---

@mit2nil
Copy link
Member

mit2nil commented Aug 18, 2023

@tracyboehrer for visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants