After creating a migration project in Azure, we went to the Discover phase to create a key for the migration appliance. We gave a name to the appliance and a key was generated. However, when we put the key in to link it back to the subscription in Azure, we get the message that "The Migrate project key entered seems to be incorrect". However we've copied/pasted it right from Azure to the appliance itself. It's almost like Azure is generating a key that's invalid.
We are the "owner" of the Azure account, so we don't think there's a permissions/RBAC issue. We tried using an Azure free account unrelated in anyway to our main account, and the key that generated worked correctly and the appliance could connect without fail. On the account with the problem, we've tried creating the projects/appliance keys in different subscriptions, in different regions all with the same result - the generated keys don't work; it doesn't appear that the appliance even tries to contact Azure, it gives the error immediately as if the key is not formatted correctly. We compared the keys from the free/working Azure account and the non-working keys, and we see differences (beyond the GUIDs that would always be different) - there's actually a URL attached to the end of the key in a way that makes us think it shouldn't be there.
The end of the "working" key from the Azure free account is:
which seems reasonable, where the resource group is called out, along with the test project name we created. However, the non-working key ends with this:
which is a completely different format than the prior one. Is this really part of the issue or are there 'region' differences that might make the key look different?
If this looks like it is formatted correctly, what else could be causing the issue? If it doesn't appear correct, why would Azure generate a key that was useless?