question

tagedanielsson-1319 avatar image
0 Votes"
tagedanielsson-1319 asked SatishBoddu-MSFT commented

"Bad request" error while creating a tenant

When I try to create a tenant:

azsphere create tenant --name NewTenant

I get promted:

You have logged in with the following account: t*@**.com. Caution: a device can only be used once to create a tenant. Do you want to use this account to create a new Azure Sphere tenant using the attached device? (y/n):

I press "y" and enter. I am expecting to create a new tenant using the attached device but instead I get this error:

command failed due to invalid parameters. Check the values you provided and try again. The Azure Sphere Security Service sent the following message: Bad Request

What does this even mean and what should I do about it.


azure-sphere
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SatishBoddu-MSFT avatar image
0 Votes"
SatishBoddu-MSFT answered SatishBoddu-MSFT commented

Hello @tagedanielsson-1319

Are you sure that you are using the right account to create a new Azure Sphere tenant using the attached device?

I hope you have already visited this page:

When you create a tenant, the Azure Sphere Security Service records the device ID of the attached device. Each device ID can be used to create only one Azure Sphere tenant.

You can use the --force-additional parameter to force a new Azure Sphere tenant to be created. Use this command only if you are certain that you want to use the current account to create a new Azure Sphere tenant using the attached device. A device that has previously been used to create an Azure Sphere tenant cannot be used to create a new tenant.

Normally "azsphere tenant create" should read the locally attached device ID and send it automatically. Anyone needing to create a tenant should get the device ID with "azsphere device show-attached" and then use "azsphere tenant create -d <deviceid>" Please try this command and do let us know!

Please comment in the below section for further help in this matter, happy to help.

Please accept the helpful response as 'Answer', which will be helpful to others as well with similar questions


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@SatishBoddu-MSFT Thanks for the help!

I tried using the device id when creating the tenant and it worked! I still don't understand why the error message was "Bad Request", shouldn't it say something like "the following arguments are required: --device/-d" if the device id is needed to create a tenant. Just as if you don't specify a name ("the following arguments are required: --name/-n"). How would you know to use the id if it isn't clear in the error message? Anyways, Thanks for the help.

0 Votes 0 ·
SatishBoddu-MSFT avatar image SatishBoddu-MSFT tagedanielsson-1319 ·

Thanks for reporting this! This is very helpful for others as well to resolve the similar issue as a workaround!
We are tracking this issue internally and sure it will be fixed in future releases, thanks for your patience and support in this matter. We really appreciate it!

0 Votes 0 ·