Describe the bug
A clear and concise description of what the bug is.
Repro Code:
import { loginWithServicePrincipalSecret } from "@azure/ms-rest-nodeauth";
import { SqlVirtualMachineManagementClient } from "@azure/arm-sqlvirtualmachine";
async function run() {
const creds = await loginWithServicePrincipalSecret(
"",
"",
""
);
const client = new SqlVirtualMachineManagementClient(creds, "");
}
Argument of type 'ApplicationTokenCredentials' is not assignable to parameter of type 'ServiceClientCredentials'.
Types of property 'signRequest' are incompatible.
Type '(webResource: import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource) => Promise<import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource>' is not assignable to type '(webResource: import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/arm-sqlvirtualmachine/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource) => Promise<import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/arm-sqlvirtualmachine/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource>'.
Types of parameters 'webResource' and 'webResource' are incompatible.
Type 'import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/arm-sqlvirtualmachine/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource' is not assignable to type 'import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource'.
Types of property 'shouldDeserialize' are incompatible.
Type 'boolean | ((response: import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/arm-sqlvirtualmachine/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse").HttpOperationResponse) => boolean)' is not assignable to type 'boolean | ((response: import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse").HttpOperationResponse) => boolean)'.
Type '(response: HttpOperationResponse) => boolean' is not assignable to type 'boolean | ((response: HttpOperationResponse) => boolean)'.
Type '(response: import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/arm-sqlvirtualmachine/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse").HttpOperationResponse) => boolean' is not assignable to type '(response: import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse").HttpOperationResponse) => boolean'.
Types of parameters 'response' and 'response' are incompatible.
Type 'import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse").HttpOperationResponse' is not assignable to type 'import("/Users/hdavidzhu/azure-vm-test/node_modules/@azure/arm-sqlvirtualmachine/node_modules/@azure/ms-rest-js/es/lib/httpOperationResponse").HttpOperationResponse'.
The types of 'request.headers' are incompatible between these types.
Property '_headersMap' is missing in type 'HttpHeadersLike' but required in type 'HttpHeaders'.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
The client should accept the credentials.
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
From https://github.com/Azure/azure-sdk-for-js/issues/6368, it looks like @azure/arm-sqlvirtualmachine works with @azure/ms-rest-nodeauth@2, but I'm using v3 for all my other clients.
Thanks for reporting @hdavidzhu!
@qiaozha, Can we have the package re-generated using the latest v4 of the code generator to fix this?
@ramya-rao-a Hi, I have a PR #11252 to fix this issue. Could you please help review it? Thanks
@hdavidzhu Could you please try https://www.npmjs.com/package/@azure/arm-sqlvirtualmachine/v/4.0.0. This should resolve your problem. Thanks
Will do, thanks! (I'll report back later today.)
Looks like it worked! Thank you for all your help.