Skip to content

Commit

Permalink
Do not include Connect-AzureAD within the command
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasKur committed Jul 22, 2023
1 parent ae6dfe2 commit f1a5f15
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ Function New-M365DocAppRegistration(){
}

#region Authentication
Connect-AzureAD | Out-Null
try{
Get-AzureADContract -ErrorAction Stop | Out-Null
} catch {
Write-Error "You must call the Connect-AzureAD cmdlet before calling this cmdlet." -ErrorAction Stop
}
#endregion
#region Main Script
########################################################

$displayName = "WPNinjas.eu Automatic Documentation"
$displayName = "WPNinjas.eu Automatic Documentation Custom 2"
$appPermissionsRequired = @("AccessReview.Read.All","Agreement.Read.All","AppCatalog.Read.All","Application.Read.All","CloudPC.Read.All","ConsentRequest.Read.All","Device.Read.All","DeviceManagementApps.Read.All","DeviceManagementConfiguration.Read.All","DeviceManagementManagedDevices.Read.All","DeviceManagementRBAC.Read.All","DeviceManagementServiceConfig.Read.All","Directory.Read.All","Domain.Read.All","Organization.Read.All","Policy.Read.All","Policy.ReadWrite.AuthenticationMethod","Policy.ReadWrite.FeatureRollout","PrintConnector.Read.All","Printer.Read.All","PrinterShare.Read.All","PrintSettings.Read.All","PrivilegedAccess.Read.AzureAD","PrivilegedAccess.Read.AzureADGroup","PrivilegedAccess.Read.AzureResources","User.Read" ,"IdentityProvider.Read.All","InformationProtectionPolicy.Read.All" )
$targetServicePrincipalName = 'Microsoft Graph'

Expand Down

0 comments on commit f1a5f15

Please sign in to comment.