Hello, all. Wanted to consolidate some information into one comment / answer in case someone comes across this later.
Previously, when selecting Single Tenant, my bot would fail to work at all or certain actions would fail. That has largely been taken care of my following Microsoft's guidance of redeploying your bot using the Bot Framework version 4.15 or later per this documentation:
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-deploy-az-cli
However, I still ran into an issue post-deployment which I didn't discover until later. A portion of my bot requires getting an authentication token, and that started throwing the same error I had been encountering before:
"Failed to acquire token for client credentials. (AADSTS700016: Application with identifier '<app_id>' was not found in the directory 'Bot Framework'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant."
The relevant code is:
MicrosoftAppCredentials credentials = new MicrosoftAppCredentials(_appId, _appSecret);
var tokenString = await credentials.GetTokenAsync().ConfigureAwait(false);
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenString);
var responseMessage = await httpClient.GetAsync(uri);
Changing the first line of code to this corrects the issue:
MicrosoftAppCredentials credentials = new MicrosoftAppCredentials(_appId, _appSecret, _tenantId, httpClient);
My only theory on this is that credentials for bots are validated against the 'Bot Framework' tenant by default. When you switch to single tenant, your bot isn't registered in the 'Bot Framework' tenant. So you have to explicitly specify that you want to authenticate against your own tenant in order for the token to be retrieved successfully.