The bot is getting an error "Value cannot be null. Parameter name: clientId"
while executing GetConversationMembersWithHttpMessagesAsync method to get conversation users data. The conversation is just works fine, i can send and receive messages, but when i try to get info about the current conversation i get this exception.
Is there a necessity to create Bot Channels Registration at Azure to maintain such operations?
I've tried to manually add CustomHeaders with bearer token to http-query without a result.
customHeaders.Add("Authorization", new List<string> { "Bearer " + Global.accessToken });
membersListResponse = await connector.Conversations.GetConversationMembersWithHttpMessagesAsync(convId, customHeaders);
Error and stack trace:
Value cannot be null.
Parameter name: clientId at Microsoft.IdentityModel.Clients.ActiveDirectory.ClientCredential..ctor(String clientId, String clientSecret)
at Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials.<>c__DisplayClass8_0.<.ctor>b__0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue()
at Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials.GetTokenAsync(Boolean forceRefresh)
at Microsoft.Bot.Connector.Authentication.MicrosoftAppCredentials.ProcessHttpRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Bot.Connector.Conversations.GetConversationMembersWithHttpMessagesAsync(String conversationId, Dictionary
2 customHeaders, CancellationToken cancellationToken)