AZ-104 practice question 1 of 35
You have an Azure App Services web app named App1. You plan to deploy App1 by using Web Deploy. You need to ensure that the developers of App1 can use their Azure AD credentials to deploy content to App1. The solution must use the principle of least privilege. What should you do?
Full set: 569 questionsDomain Deploy and manage Azure compute resources
The Website Contributor role is the built-in Azure role designed with the principle of least privilege for this specific task. It grants permissions to manage the web app's settings and content, including the necessary Microsoft.Web/sites/publish/action permission required for Web Deploy. Assigning this role allows developers to authenticate using their Azure AD credentials for deployment without granting excessive permissions, such as managing the App Service Plan, virtual networks, or assigning roles to other users, which roles like Contributor or Owner would provide.
A. Assign the Owner role to the developers This role grants full access to all resources, including permission management, which violates the principle of least privilege.
B. Configure app-level credentials for FTPS These are shared credentials specific to the app, not individual Azure AD credentials, failing a key requirement of the question.
D. Configure user-level credentials for FTPS These are deployment credentials set at the Azure account level for FTP/S, and they are separate from Azure AD credentials. ---
1. Microsoft Learn | Azure built-in roles: The documentation lists the Website Contributor role and its purpose. The role definition includes the Microsoft.Web/sites/publish/action permission
which is essential for deploying code. This role is more constrained than Owner or Contributor.
Source: Microsoft Docs
"Azure built-in roles
" under the "Website Contributor" section.
Reference: https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#website-contributor
2. Microsoft Learn | Configure deployment credentials for Azure App Service: This document explains the different types of credentials for deployment. It distinguishes between account-level credentials and app-level credentials for FTP/S and Web Deploy
which are separate from Azure AD-based authentication provided by RBAC.
Source: Microsoft Docs
"Configure deployment credentials for Azure App Service
" sections "User-scope credentials" and "App-scope credentials."
Reference: https://learn.microsoft.com/en-us/azure/app-service/deploy-ftp?tabs=portal#deployment-credentials
3. Microsoft Learn | Role-based access control: This document outlines the principle of least privilege as a security best practice
which involves granting users only the permissions they need to perform their jobs. The Website Contributor role aligns with this principle for the described task.
Source: Microsoft Docs
"What is Azure role-based access control (Azure RBAC)?"
section "Best practices for Azure RBAC."
Question breakdown
Key idea: Web Deploy through the Kudu/SCM endpoint can authenticate Microsoft Entra ID (Azure AD) users who hold an RBAC role with write access to the web app, and Website Contributor is the narrowest built-in role that grants this.
How to reach the answer
- The clue 'use their Azure AD credentials' rules out FTPS deployment credentials, which are separate username/password pairs.
- Web Deploy targets the SCM (Kudu) endpoint, which accepts Entra ID tokens for users with suitable RBAC permissions on the site.
- The clue 'principle of least privilege' means picking the narrowest role that can still write site content.
- Owner works but is far broader than needed. Website Contributor manages web apps without granting access management or plan control, so it fits.
Each option
Common trap: 'User-level credentials' sounds like personal identity, but these are standalone deployment credentials and are not Azure AD accounts.
In practice: Teams often turn off basic publishing credentials (SCM/FTP basic auth) for security. They then give developers Website Contributor on specific apps so deployments use Entra ID identities and leave an audit trail.
Remember: Azure AD-based deployment to App Service means granting an RBAC role, and Website Contributor is the least-privilege choice for one web app.
Official documentation: Azure built-in roles · Configure deployment credentials for Azure App Service
Drafted with AI assistance and checked against the answer key.
Keep practicing
Take the free AZ-104 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AZ-104 practice questions
- Question 2Your company has an azure subscription that includes a storage account, a resource group,…
- Question 3You have an Azure Active Directory (Azure AD) tenant named contoso.com. You have a CSV fil…
- Question 5You have an Azure subscription. You plan to deploy an Azure Kubernetes Service (AKS) clus…
- Question 6You have an Azure virtual machine named VM1. VM1 was deployed by using a custom Azure Res…
- Question 7You need to ensure that VM1 can communicate with VM4. The solution must minimize administ…
- Question 9You have an Azure virtual machine named VM1 that runs Windows Server 2016. You need to cr…
