Hello,
I tried using Adal library to get a b2c token based on user name and password.
It fails with the following message : "AADSTS50049: Unknown or invalid instance."
The NodeJs code is quite simple:
var context = new AuthenticationContext(applicationConfig.authority);
context.acquireTokenWithUsernamePassword (resource, userdata.id, userdata.pwd, applicationConfig.clientId, function(err, tokenResponse) {
if (err) {
console.log('well that didn\'t work: ' + err.stack);
} else {
console.log(tokenResponse);
}
});
The applicationConfig parameters come from my b2c tenant.
I used an example from : https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/tree/master/sample
Does anyone know what I'm missing ? What is the root cause of this error ?
Thank you in advance.
Regards.
David