-
Notifications
You must be signed in to change notification settings - Fork 279
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
CertificateAppCredentials defaults tenant to botframework.com #4636
Comments
Hi @XVincentX, The CertificateAppCredential class has the |
Since any change would be breaking, lets add comments around this behavior in that class. There is probably a bit more history here since the other app types were added later. |
|
"botframework.com" has been the default tenant in AppCredentials, however subclasses can change this. As in the case of Gov cloud where its "MicrosoftServices.onmicrosoft.us". Though the option is there to specify a different tenant in the constructor. Most of this dates back far, when there was only MultiTenant auth. It would appear that it just wouldn't be possible to change without creating a breaking change. There probably is a clearer way if we were green rooming it. Also, the credential factories, which is central to CloudAdapter have tenantId as optional too. For example, CertificateServiceClientCredentialsFactory. |
https://github.com/microsoft/botbuilder-js/blob/main/libraries/botframework-connector/src/auth/certificateAppCredentials.ts#L39
The
CertificateAppCredential
class does not require a tenant id when creating a new instance; yet I found out (and make me lose hours) is that if you are not providing it, it will automatically set it tobotframework.com
- which does not look like a good defaultI am not too sure why such parameter is optional, since the authentication just cannot happen without a tenant ID, and using
botframework.com
as default does not look a good backup planbotbuilder-js/libraries/botframework-connector/src/auth/authenticationConstants.ts
Line 31 in f487de2
The text was updated successfully, but these errors were encountered: