Tests/Test-GetAadAppAndSP.ps1
Remove-Module AadSupport Import-Module AadSupport Connect-AadSupport Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipal : By DisplayName" -ForegroundColor Yellow Get-AadServicePrincipal 'custom web app' | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipal : By ServicePrincipalName" -ForegroundColor Yellow Get-AadServicePrincipal 'https://graph.microsoft.com' | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipal : By AppId" -ForegroundColor Yellow Get-AadServicePrincipal 5120cd5d-afbb-4cac-92c3-fc3ff3eda1d8 | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipal : By ObjectId" -ForegroundColor Yellow Get-AadServicePrincipal 29b586ab-710b-4ca7-8ae4-2c91f427522d | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipal : By ReplyAddress" -ForegroundColor Yellow Get-AadServicePrincipal -ReplyAddress "https://adfshelp.microsoft.com/ClaimsXray/TokenResponse" | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipal : Look up multiple apps" -ForegroundColor Yellow Get-AadServicePrincipal 'custom' | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipalAccess" -ForegroundColor Yellow Get-AadServicePrincipalAccess 'custom web app' Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadServicePrincipalAdmins" -ForegroundColor Yellow Get-AadServicePrincipalAdmins Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadApplication : By DisplayName" -ForegroundColor Yellow Get-AadApplication 'custom web app' | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadApplication : By AppUriId" -ForegroundColor Yellow Get-AadApplication 'https://williamfiddes.onmicrosoft.com/CustomWebApp' | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadApplication : By AppId" -ForegroundColor Yellow Get-AadApplication 5120cd5d-afbb-4cac-92c3-fc3ff3eda1d8 | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadApplication : By ObjectId" -ForegroundColor Yellow Get-AadApplication 29b586ab-710b-4ca7-8ae4-2c91f427522d | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadApplication : By ReplyAddress" -ForegroundColor Yellow Get-AadApplication -ReplyAddress "https://adfshelp.microsoft.com/ClaimsXray/TokenResponse" | Format-Table Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "TEST Get-AadApplication : Look up multiple apps" -ForegroundColor Yellow Get-AadApplication 'custom' | Format-Table |