Connect to Sharepoint Online using Powershell and Azure AD service principal

Connect to Sharepoint Online using Powershell

Our goal is to connect to sharepoint online using an Azure AD service principal from Powershell. You can use this approach to connect to sharepoint online when you are creating an unattended powershell script. Steps given in this blog post will enable you to create a connection to sharepoint online …

Read more

How to Fix error Connect-PnPOnline: The user or administrator has not consented to use the application with ID ‘31359c7f-bd7e-475c-86db-fdb8c937548e

Recently I tried to connect to Sharepoint online using Connect-PnPOnline cmdlet and received below error message. In this blog post, we will see alternative ways to connect using this command which utilized interactive login methods. In below screenshot, you can see the command along with the error message. Error Message …

Read more

How to create Microsoft 365 groups in bulk with sharepoint site and Teams using Powershell

microsoft 365 groups

About the Task This week I received a request to create Microsoft 365 groups in bulk using Powershell. I tried to use New-UnifiedGroup command (part of EXO V2 Powershell Module) to create Microsoft 365 group which worked fine for creation of the group but this command did not create corresponding …

Read more

Export MFA Status, StrongAuthInfo and DefaultAuthMethod from office 365 using PowerShell

You can export Office365 users DisplayName, UsageLocation, UserPrincipalName, MFA Status, StrongAuthInfo, DefaultAuthMethod using powershell. The exported data will be in a CSV File which will list these details. Default MFA Method is useful when you want to know who in your company is using which MFA method to authenticate to …

Read more

Exchange Online / Exchange 2010 useful PowerShell Commands

Export the Access Rights / Permissions assigned to All user mailboxes in Office365. Export the Access Rights / Permissions assigned to All Shared Mailboxes in Office365 Export the Access Rights / Permissions assigned to All Shared Mailboxes in Office365 (Another Variation to Export only relevant information) List the Access Rights / …

Read more

Emails are not moving to Archive Mailbox after Applying Retention Policy | Litigation Hold | Retention Hold

Recently came across an issue where we had applied the Mailbox Retention Policy for all the users but for some of the users, emails were not getting moved to Online Archive Mailbox. After investigating on this issue, it was identified that the retention hold was enabled on these users mailbox …

Read more