Hi @chris_nawig · Thank you for reaching out.
To connect to Azure AD via PowerShell, you need to run Connect-AzureAD cmdlet after installing Azure AD PowerShell Module.
To store the credentials in variable, you can run:
$Credential = Get-Credential
Connect-AzureAD -Credential $Credential
Note: If you are storing credentials in variable, MFA must be disabled for the user account.
For Python, you can refer to this code sample.
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.