This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect | |
$passwd = ConvertTo-SecureString "NewUserSSecret@Pass61" -AsPlainText -Force | |
$creds = New-Object System.Management.Automation.PSCredential ("AS-5945632460@oilcorptarsands.onmicrosoft.com", $passwd) | |
Connect-AzAccount -Credential $creds | |
#Connect-AzureAD -Credential $creds | |
Connect-MgGraph -ClientSecretCredential $creds -TenantId bcdc6c96-4f80-4b10-8228-2e6477c71851 | |
## 1. Unauthenticated Recon: | |
#Get if Azure tenant is in use, tenant name and Federation | |
https://login.microsoftonline.com/getuserrealm.srf?login=[USERNAME@DOMAIN]&xml=1 |