I can not move an azure website from one subscription to another - azure

We have 2 azure subscriptions old and new.
I can not use the resource move button to push the app service mysite.azurewebsites.net from the old subscription to the new subscription.
That would be too easy! The subscriptions are from different people/companies so the old subscription is not aware of the new subscription in the user interface of azure portal.
Now I have 2 questions:
1.) Is there any way to still move the app service although they do not share the same tenant? - I guess its called like that - Can I make both subscriptions to have the same tenant?
2.) I assume here that I have to re-create the app service and copy/paste all appsettings and that option 1.) will not work! But doing that I can not create the app service with the same name mysite.azurewebsites.net because its already in use in the old subscription and site names must be unique in the whole azure system. (too bad that production app does not use a certificate... rolleyes)
How will number 2. work then? I really need that name because many other websites already use it...

1.) Is there any way to still move the app service although they do not share the same tenant? - I guess its called like that - Can I make
both subscriptions to have the same tenant?
Unfortunately, it's not possible to do that. One tenant can have different subscriptions, but one subscription can only in one tenant(Azure Active Directory). So, If your another subscription has belonged to another tenant, you cannot share it with your this tenant.
How will number 2. work then?
Yes, you need to recreate your App service. If you want to use the old App name for your new App , you need to delete the old Web App. Because Azure doesn't allow two Web Apps have a same App name.
Hope this helps!
Update
There are two another ways to achieve that.
Redirect the old web app's URL to the new web app .This can be done by configure your web app itself.
a. You can back up your old app to a storage account.
b. Delete your old web App.
c. Download the backup files to your local machine.
d. Go to another subscription and upload the backup file to a storage account.
e. Restore the old app from the storage account.
These ideas are inspired by the OP-#Elisabeth. Thanks!
Update 2
Unfortunately, my test result is failed. When I selected the ZIP file from a storage account to restore the app, it just did not respond at all. It can restore it by app back up. But from the storage account, it did not succeed .

Related

Is there no perpetually free Azure subscription?

So I'm wanting to send emails from a Microsoft account using OAuth2 and everything I am reading says I need to setup some things in Azure Active Directory (for app registration to get a client secret and all this stuff) which I can do when I follow their instructions but everything seems to be contingent on an active Azure subscription which seems to cost a heck of a lot of dollars and cents.
I can create an account for free but that's only for up to a year. So am I wrong in thinking I won't be able to do this unless I pay heaven-knows-what for an Azure subscription?
I'm going by these instructions:
https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth
If you only want to register the application in Azure AD to obtain the client secret and other basic settings about the application, you do not need to subscribe.

How to reuse a host name 'something.azurewebsites.net' on a different Azure account

I have two Azure accounts. With the first account I created an App Service (ASP.NET Core Web App on URL: [something].azurewebsites.net). Then I decided to move it to my different account, so I deleted completely - App Service, App Service Plan and also the whole Resource Group.
When I am trying to create a new App Service on the second account (with exactly the same URL [something].azurewebsites.net), I am getting the error: The host name [something].azurewebsites.net is already assigned to another Azure website. I am 100% sure that it was deleted from the first account.
ExtendedCode": "54003","MessageTemplate": The host name {0} is already assigned to another Azure website.","Parameters": ["[something].azurewebsites.net"],"Code": "Conflict"
this worked for me without any issues. created a webapp on one account, deleted it after and created on another account.
As you have already created CNAME for the website with your old subscription, that needs to be de-associate to use it again with your new subscription.

How to create an Azure Subscription and Azure Active Directory programatically

I have a requirement to be able to create an Azure subscription and Azure AD Tenant programmatically (e.g with Terraform or an ARM Template etc - this part is not important, as long as I can find an API).
Looking at the Azure RM it doesn't seem to be possible. Even the UI seems to redirect to a different app to create a subscription.
Any ideas on how to go about this?
We had a similar requirement on a project two years ago and we found no way to programatically provision a subscription nor an Azure Active Directory.
As far as I know, this is still not possible. However, we "solved" it by manually creating a pool of subscription and AAD and used them in our tenant boarding application.

How to move resources from subscriptions in different directories in Azure

In my azure account I have 2 directories, lets call them directory A and B.
With some recent changes I need to switch a app service from a subscription in directory A to a subscription that is on directory B.
Is this possible to achieve, and if it is how?
EDIT 1
As directory I mean the directory that you can see in the image below:
EDIT 2
Since It seems that I have mislead people I will try to explain what i want to achieve with images.
I want to move the App Service from the App Service Plan in the directory A as you can see in here:
to the App Service Plan in the directory B that you can see in here:
It looks like you want to move resources between subscriptions. It is possible to do this but there are a few restictions and rules around what you can do.
You can definitely move an App Service between subscriptions. However, in your case, as the subscriptions in question exist in different AD tenants, you will need to change the tenant of one of the subscriptions. You can only do this if you are a Service Administrator and signed in using a Microsoft i.e non organizational account.
Check this reference document from Microsoft, it explains in detail how the transfer process works.
I think we might need some additional information, since it seems that the terms we're using are sometimes equivocal. Microsoft Azure subscriptions are not associated to Azure Active Directories, but to an Service Account. You can add how many Azure ADs you want to an Azure subscription, but the Azure subscription itself will be managed by the service account (which is not necessarily member of a certain Azure AD).
Further, only the service administrator can manage Azure resources, like VMs, App Services and so on. Azure AD admins can only manage identity aspects that define identity life cycles within that specific Azure AD. The service admin could add a co-admin a user from the default Azure AD and that user would then also be able to manage Azure resources, like App Services and so on.
So the Azure App Service is tied to a Azure subscription that is managed by a service account, not by the Azure AD. Please check the official documentation on this topic. Also please clarify exactly what you would like to do.

Azure, login to separate accounts with one email

I'm a developer that has an Azure account for my own dev stuff. I log into my dev account using me#hotmail.com.
Next, I set up a client with their own Azure account, then invited myself via me#hotmail.com and set myself as a co-administrator for the client's subscription. When I subsequently log into Azure using me#hotmail.com, I only see my own subscriptions/resources, etc.
Is there a way that I can log into Azure, using me#hotmail.com, and have access to both my dev stuff as well as my client's subscription from within the portal (specifically portal.azure.com).
Not sure if this is supported or if I'm doing something wrong. Thanks
You can only view subscriptions for a single directory at a time.
If you click your name in the top right corner of the portal you can select which directory you want to work from.
There is a suggestion on the Azure feedback site to add the ability to view subscriptions from all directories: http://feedback.azure.com/forums/223579-azure-preview-portal/suggestions/4761959-manage-subscriptions-across-all-available-director

Resources