Botframework-composer: "User was not found" when running node provisionComposer.js

Created on 22 May 2020  路  10Comments  路  Source: microsoft/BotFramework-Composer

Describe the bug

When I run the provisionComposer.js script I get the error "User was not found"

image

I'm using an MSDN subscription
The user running the command is account admin on that subscription and has permissions to create app registrations - I have created them through the Azure CLI and through the portal successfully

I get a similar error when I create the app registration first
image

Version

I'm using release 1.0.0

Sha: 414f00d2896885959f91074dd70c3187fdf1b2cf

Browser

  • [x] Chrome
  • [ ] Safari
  • [x] Firefox
  • [ ] Edge

OS

  • [ ] macOS
  • [x] Windows
  • [ ] Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Additional context

Needs investigation R10 Bug

Most helpful comment

@benbrown @zidaneymar @cwhitten
Hi Team,
This is not working. I created a new project from template (AskingQuestionsSample) from 1.0.1 version. I still get same error.
Also, could you please let me know how to fix the project created with 1.0.0 version. Its still showing "user was not found."

All 10 comments

I was able to resolve this issue by making a change to the provisionComposer.js. The adjustment was to pass the tenant ID to .interactiveLogin()

The error is related to the account loggin in to Azure being a Microsoft account and not an organisational account

Solution was found here - https://github.com/Azure/azure-sdk-for-node/issues/1821

Hi @benbrown , I think we should enable users to enter their tenant id for provision, according to the link provided by @timoconnellaus , we should use this following code to login to Azure. What do you think about this?
msRestAzure.interactiveLogin({domain: 'your-tenant-id}, function(err, credentials, subscriptions)

@zidaneymar yes, since it is already possible to pass in the tenantId as a parameter, we should use this if specified in the login.

Hi,
After making below change, I am still getting same error - "user was not found". I am using azure subscription from hotmail account.
msRestNodeAuth
.interactiveLogin({ domain: tenantId })
.then(async creds => {
const createResult = await create(
creds,
subId,
name,
location,
environment,
appId,
appPassword,
createLuisResource,
createLuisAuthoringResource,
createCosmosDb,
createStorage,
createAppInsignts
);

@benbrown @zidaneymar @cwhitten Hi Team,
Can you please help me with above issue.

@benbrown @zidaneymar @cwhitten
Hi Team,
This is not working. I created a new project from template (AskingQuestionsSample) from 1.0.1 version. I still get same error.
Also, could you please let me know how to fix the project created with 1.0.0 version. Its still showing "user was not found."

Hi @GAURI02X, can you copy the updated provisioning directory to your bot scripts folder and try again on your 1.0.0 bot?

https://github.com/microsoft/BotFramework-Composer/tree/master/Composer/plugins/samples/assets/shared/scripts

@benbrown @zidaneymar @cwhitten
Hi Team,
This is not working. I created a new project from template (AskingQuestionsSample) from 1.0.1 version. I still get same error.
Also, could you please let me know how to fix the project created with 1.0.0 version. Its still showing "user was not found."

Did you fix the issue? I am facing exactly the same issue. I am also using a hotmail Azure subscription.

@benbrown @zidaneymar @cwhitten
Hi Team,
This is not working. I created a new project from template (AskingQuestionsSample) from 1.0.1 version. I still get same error.
Also, could you please let me know how to fix the project created with 1.0.0 version. Its still showing "user was not found."

Did you fix the issue? I am facing exactly the same issue. I am also using a hotmail Azure subscription.

I pass the AAD tenant ID as a parameter for provisionComposer.js. Then issue is resolved. I think somehow it did not get the corrrect tenant ID when the value is not passed.

Looks like provisionComposer.js script is picking up the first one in the list and which might not be your intended one.
image

Try adding below parameter:
--tenantId=<AAD Tenant Id>

Was this page helpful?
0 / 5 - 0 ratings