Files
docs/scripts/Identity and Certificates/Microsoft 365/Connect to Azure AD.md
T
nicole 289769a601
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 8s
Restructured Documentation
2026-09-05 14:08:43 -06:00

31 lines
933 B
Markdown

---
tags:
- PowerShell
- Scripting
---
## Purpose
Sometimes you will need to connect to Azure AD via powershell in order to perform troubleshooting / automation.
## Update Nuget Package Manager
```powershell
Install-PackageProvider -Name NuGet -Force -ForceBootstrap
```
## Install AzureAD Powershell Modules
You will need to install the modules for AzureAD before you can run the commands necessary for querying Azure.
```powershell
Install-Module -Name AzureAD
```
## Connect to AzureAD
When you run the following command, it will open a dialog box to take the username, password, and MFA code (if applicable) for an administrative account in the Azure Active Directory.
```powershell
Connect-AzureAD
```
## Related Documentation
- [Related Identity and Certificates Documentation](<../../../reference/Identity and Certificates/index.md>) — Find the connected deployments, procedures, and references for this subject.