Connecting to an Azure website via FTP using Azure login credentials - azure

What login credentials do I use to connect to the FTP site that is listed on the dashboard of my Azure?
I tried using the same credentials I use to log into Azure, but this failed.

In the current Azure portal the deployment credentials can be set by going to App Services → select the relevant app service item → in the Deployment section → Deployment Center → FTP → Dashboard. You can either chose to use the preprovided App Credentials or assign User Credentials.
In the previous generation Azure portal the deployment credentials can be set up by going to WEB APPS → select relevant item → DASHBOARD → Reset your deployment credentials.
Make sure you're specifying siteName\userName as your login name. The site name portion is required!
The default directory for the web content is \site\wwwroot which can be set as the initial directory for many FTP clients.

If you want use the default value you need to download the publish profile in your dashboard for your site:
[UPDATE for the new Azure UI]
It will be an XML file. Open it and find your credentials. Sample:
<publishProfile
profileName="nameofyoursite - FTP"
publishMethod="FTP"
publishUrl="ftp://waws-prod-blu-001.ftp.azurewebsites.windows.net/site/wwwroot"
ftpPassiveMode="True"
userName="nameofyoursite\$nameofyoursite"
userPWD="sOmeCrYPTicL00kIngStr1nG"
destinationAppUrl="http://nameofyoursite.azurewebsites.net"
SQLServerDBConnectionString=""
mySQLDBConnectionString=""
hostingProviderForumLink=""
controlPanelLink="http://windows.azure.com">
<databases/>
</publishProfile>
Where your credentials:
publishUrl="ftp://waws-prod-blu-001.ftp.azurewebsites.windows.net/site/wwwroot"
userName="nameofyoursite$nameofyoursite"
userPWD="sOmeCrYPTicL00kIngStr1nG"
Source: Azure Web Sites FTP credentials
Connection from command line on OS X:
Console client:
ftp ftp://nameofyoursite:sOmeCrYPTicL00kIngStr1nG#waws-prod-blu-001.ftp.azurewebsites.windows.net/
Mount from the console:
mkdir /Users/<YOUR_USER>/FTP_AZURE
mount_ftp nameofyoursite:sOmeCrYPTicL00kIngStr1nG#waws-prod-blu-001.ftp.azurewebsites.windows.net/ /Users/<YOUR_USER>/FTP_AZURE
cd /Users/<YOUR_USER>/FTP_AZURE
Open for editing in Vim:
vim ftp://nameofyoursite#waws-prod-blu-001.ftp.azurewebsites.windows.ne//site/wwwroot/
Note the user name here: nameofyoursite, not nameofyoursite$nameofyoursite

To be complete, you can FTP using two different credentials:
It is already mentioned by #0x8BADF00D. If you downloaded the 'publish profile', you can see the automatically generated credentials for each site.
In short, if x=your website name, then username=x\$x and the password is a long system generated string
Obviously, this is not meant for a human user...at least I cannot easily remember a 20+ character random string...
There is a more user friendly way. You can set a username and password in Azure portal
However, "deployment user name" is directly tied to a Microsoft account. It is the same for all your web applications. In order to use it to ftp into different web applications, you need to add a prefix.
Here, my username is "blabla", and my website name is "test" ==> my FTP username is thus "test\blabla" (mind the backslash on Windows) followed by the password I set on Azure portal (no modification required):
Here are the references from Azure:
Why there are two credentials for FTP
How to log in with the user friendly credential

In the Azure portal (end of 2018):
Go to your app
In the left pane, select Deployment Center
In the middle pane, select FTP
Click view dashboard, and there you have your ftps connection url, username and password.
You must enable FTP/S on your web app to actually be able to connect! This is done under Application Settings -> FTP Access in the Azure portal

These two blades give all the required information to connect via FTP.
App Service > Settings > Properties
App Service > Deployment > Deployment Center > Deployment Credentials

Related

AZURE WEB APP: Problem: fatal: Authentication failed for 'webapp url'

Good day I am new on web developing and want to ask on how to fix this error in the terminal of Azure webapp service, git push azure main this is the command I keep inserting inside the terminal but the response is always this Password for <webapp url> and I don't know what password I should enter
therefore I browse the internet and still stuck on this, the fixes I tried is removing some credentials on windows credential, changing the HTTPS to SSHS, configuring global password, and lastly installing the GCM from github thank you very much
In Azure Portal, first we need to create Azure App service with the required run time stack.
You will get this option, if we deploy our App using Local Git.
We need to provide Credentials while pushing the code from local GitHub.
You will get the Credentials from Azure Portal => App Service.
Navigate to Azure Portal => Your App Service (which you have created in first step) => Deployment Center => Local Git/ FTPS credentials.
We can use the existing Application scope Username and Password or can create new User scope and use them.

Deploying an Azure Web App through Jenkins

I am trying to deploy an Azure Web App through a Jenkins scripted pipeline using the Azure App Service Plugin. This is my deploy-command (GUIDs have been changed):
azureWebAppPublish azureCredentialsId: 'a0774bb6-e471-47s9-92dc-5aa7b4t683e8', resourceGroup: 'my-demo-app', appName: 'MY-DEMO-APP', filePath: 'public/*, package.json'
When running the script I get the following error:
The client '03a1b3f9-a6fb-48bd-b016-4e37ec712f14' with object id '03a1b3f9-a6fb-48bd-b016-4e37ec712f14' does not have authorization to perform action 'Microsoft.Web/sites/read' over scope '/subscriptions/81fd39sw-3d28-454c-bc78-abag45r5d4d4/resourceGroups/my-demo-app/providers/Microsoft.Web/sites/MY-DEMO-APP' or the scope is invalid. If access was recently granted, please refresh your credentials.
The strange thing is, the ID of this "client" that's missing authorization does not appear anywhere in the build plan. It's neither the ID or a part of the service principal nor the ID of the Container Registry credentials. It also doesn't appear on the machine that executes the build (I checked both the GUID of the mother board and the windows installation). Also the term client is not used for any part of the build plan, so I don't really know what's the actual issue in this case.
Please check out this tutorial that explains how to Set up continuous integration and deployment to Azure App Service with Jenkins and One of the best method to deploy to Azure Web App (Windows) from Jenkins : https://learn.microsoft.com/en-us/azure/jenkins/java-deploy-webapp-tutorial
To find the Azure AD user with the object id '03a1b3f9-a6fb-48bd-b016-4e37ec712f14', go to Azure portal, open Cloud Shell and run
Get-AzureADUser -ObjectId '03a1b3f9-a6fb-48bd-b016-4e37ec712f14'
To diagnose or troubleshoot the issue, go to Azure Portal -> Resource Groups -> my-demo-app -> MY-DEMO-APP -> Access control (IAM) -> Role assignments -> and then search for above found AD User and check if that user has atleast read permission.
Hope this helps!

Interactive login is required. Use 'azure login' to interactively login

Trying to run Kubernetes on Azure, I'm stuck on ./azure-login.js -u <your_username>.
I'm getting the following:
[aii#localhost azure]$ ./azure-login.js -u aii#aii_domain.com
info: Executing command login
Password: ********
+ Authenticating...
error: Interactive login is required. Use 'azure login' to interactively login.
info: Error information has been recorded to /home/aii/.azure/azure.err
error: login command failed
More info:
[aii#localhost azure]$ azure --version
0.10.0 (node: 4.3.1)
BTW, my account is BizSpark Plus if it matter..
Add the following commands first:
azure account download
it will guide you to download .publishsettings file from browser which you should use for:
azure account import <downloaded file>
azure account set <"name of your subscription">
Azure login only works from a work or school id, which really means an AAD object (identity). If you have a Microsoft account, you can only "connect" with the azure account import command that takes a .publishsettings file that you have to download. (it's a cert file)
This is actually a feature of Azure, although I think we don't communicate well here. Turns out that everyone has a default Azure Active Directory domain that they get for free.
At a larger level, Azure has two management APIs:
1. Service management, which can be used with either work ids or Microsoft account ids, and
2. Resource management, which is the new stuff and can be used only with work or school ids, and that works only with the azure login functionality.

Unable to remove Azure Active-Directory due to existing Application

How to remove an orphaned Application in an Azure Directory?
I have a second (non-Default) directory that I was using to test the AD Connect app, and having finished with it, want to delete.
I have been able to remove the users both with the Management Portal and remove-msoluser, but am unable to delete the directory as it has one Application registered - "Office 365 Management APIs"
In the management console, this Application looks a little weird - there are no options to do anything on its dashboard and just checking, this Application is also installed in my Default Directory and looks the same - maybe it cannot be removed?
Have tried removing the App using the Remove-msolservice cmdlet, and tried the whole-hog approach as per Method 5 in https://support.microsoft.com/en-au/kb/2967860/en-us - seems to run through ok, but the Application is still listed, and when deleting the Directory I still get the error -
Directory has one or more applications that were added by a user or administrator
I had the same problem. When performed the steps below, I could delete the Azure Active Directory tenant:
Log in to Azure and create a new user with Global Admin permissions in the AAD you're trying to delete.
Open the Azure Active Directory Module for Windows PowerShell and execute the following:
Connect-MsolService (Log in with #onmicrosoft global admin account you created)
Get-MsolServicePrincipal | Remove-MsolServicePrincipal (This will generate errors but it's ok)
Log in to https://manage.windowsazure.com as the service admin
Delete already created #onmicrosoft.com Global Admin user
Delete the AAD now
You check the sites below as well:
http://blogs.msdn.com/b/dstfs/archive/2015/05/27/trouble-deleting-azure-active-directory-aad-due-to-quot-visual-studio-online-quot-item-in-aad-quot-applications-quot-list.aspx
or here:
https://www.opsgility.com/blog/deleting-azure-ad-applications
You must run the following cmdlets after running the remove cmdlets:
Get-MsolServicePrincipal | Set-MsolServicePrincipal -AccountEnabled $False
then delete the temporary global admin account (if any) and you should be able to delete the directory.
More information about this issue: https://support.microsoft.com/en-us/kb/3112170
This article helps me to delete Azure AD I created with old Windows Azure Portal (manage.windowsazure.com):
https://blogs.msdn.microsoft.com/ericgolpe/2015/04/30/walkthrough-of-deleting-an-azure-ad-tenant/
In a nutshell:
Create a new user under the AD you intend to delete.
User must have Global Admin role.
You will get temporary password for this user. Once login to Azure Portal with this user, you will need to create a permanent password.
Use this credential, you will remove Azure AD's applications using Azure AD PowerShell
Then, go back to Azure AD you intend to delete (using your credential, not the newly created user), delete the user you just created.
Only after doing all these will you be able to delete the Azure AD.

Azure cloud deployment fails : Certificate with thumbprint was not found

I am developing a Web API based web service to be hosted on Azure. I am using Azure 1.8 SDK.
When I try to deploy my cloud service, it takes a very long time to upload after which I get an error message which says:
12:09:52 PM - Error: The certificate with thumbprint d22e9de125640c48a4f83de06ae6069f09cfb76c was not found. Http Status Code: BadRequest OperationId: 50daf49111c9487f82f3be09763e7924
12:09:53 PM - Deployment failed with a fatal error
Apparently, the certificate being referred to is related to enabling remote desktop to role instances on the cloud (i am not very sure about this; saw this on the internet for a similar problem). However, I did not check the option to enable remote desktop on the instances while publishing.
What could be going wrong here?
What worked for me was:
Goto powershell and type mmc
Add certificates snap-in by going to File > Add/Remove Snap-in > Choose Certificates from the list > Choose My user Account
Right click on Certificates - Current User and select Find Certificates
On the dialog box, set Contains to 'azure' and Look in Field to 'Issued To'
Press Find Now. You should be able to see a list of certificates.
Check for the thumbprint by double-clicking the certificate > Details tab > scroll down to Thumbprint
Once you found your certificate, close the dialog, Right click and select Export
Select to export the private key. Follow the steps until you have a *pfx file for upload to Azure
Goto your service and select the Certificates tab
Click Upload, select the exported *pfx file, and supply the password you've set during export
Goto Dashbord and update the Cloud package
List item
The certificate used in your project doesn't exist on the cloud environment. Make sure the same certificate used by your project is uploaded to the cloud environment. If you are using Visual Studio then you can fix this error as follows:
Right click your Web Role / Worker Role (under Roles folder in the cloud project) → Properties → Certificates
Click on the ellipsis button under Thumbprint which will point to your certificate.
Upload the certificate which shown here to Windows Azure environment (Production or Staging)
have you uploaded your publishing settings file in visual studio and/or a management certificate? this is crucial to be a trusted point by your azure subscription, hence why you could be having this issue. BTW try upgrading to SDK 2.1 too for better support and better features (if possible of course).
Adding to Arbie's answer. You can avoid the first few steps. Just type "Manage user certificates" in windows search bar. Go to Personal > Certificates.
Your certificates would have Issued to "Windows Azure Tools".
You can check for the thumbprint by opening the certificate and checking the Details.

Resources