0
0
Azurecloud~20 mins

Service principals for applications in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Azure Service Principal Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary purpose of a service principal in Azure?

Choose the best description of what a service principal does in Azure.

AIt acts as a security identity for applications to access Azure resources.
BIt is a user account for administrators to manage Azure subscriptions.
CIt is a storage account used to save application secrets securely.
DIt is a virtual machine that runs application code in Azure.
Attempts:
2 left
💡 Hint

Think about how applications authenticate to Azure services without user interaction.

Architecture
intermediate
2:00remaining
Which Azure component must be created first to generate a service principal?

To create a service principal, which Azure resource is required to exist first?

AAn Azure Resource Group
BAn Azure Storage Account
CAn Azure Virtual Network
DAn Azure Active Directory application registration
Attempts:
2 left
💡 Hint

Service principals are linked to identities registered in Azure AD.

security
advanced
2:00remaining
What is the safest way to assign permissions to a service principal?

Choose the best practice for assigning permissions to a service principal to minimize security risks.

AAssign only the minimum required role permissions using Azure RBAC.
BAssign the Owner role at the subscription level for full access.
CAssign Contributor role to all resource groups to avoid permission issues.
DAssign permissions directly to the user who created the service principal.
Attempts:
2 left
💡 Hint

Think about the principle of least privilege.

service_behavior
advanced
2:00remaining
What happens if a service principal's secret expires?

What is the expected behavior when the secret (password or certificate) of a service principal expires?

AAzure automatically renews the secret without any action needed.
BThe application using the service principal will fail to authenticate until the secret is renewed.
CThe service principal is deleted automatically by Azure.
DThe application continues to authenticate using cached tokens indefinitely.
Attempts:
2 left
💡 Hint

Consider what happens when credentials are no longer valid.

Configuration
expert
2:00remaining
What is the output of this Azure CLI command sequence?

Given the commands below, what will be the output of the final command?

Azure
az ad sp create-for-rbac --name myAppSP --skip-assignment
az role assignment list --assignee <appId_of_myAppSP> --query [].roleDefinitionName
A["Reader"]
B["Owner"]
C[]
D["Contributor"]
Attempts:
2 left
💡 Hint

Consider what the --skip-assignment flag does when creating the service principal.