Skip to content

Commit

Permalink
Merge pull request #1571 from microsoft/Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois authored Nov 18, 2021
2 parents 8b73ecf + 7e40721 commit 5768de4
Show file tree
Hide file tree
Showing 68 changed files with 141 additions and 145 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log for Microsoft365DSC

# 1.21.1117.2

* MISC
* Fixes old Intune Graph Request cmdlet name;

# 1.21.1117.1

* EXOTransportRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ function Get-M365DSCIntuneAppProtectionPolicyiOS
try
{
$Url = "https://graph.microsoft.com/beta/deviceAppManagement/iosManagedAppProtections('$PolicyId')/`?expand=apps,assignments"
$response = Invoke-MSGraphRequest -HttpMethod Get `
$response = Invoke-MgGraphRequest -HttpMethod Get `
-Url $Url
return $response
}
Expand Down Expand Up @@ -915,7 +915,7 @@ function New-M365DSCIntuneAppProtectionPolicyiOS
{
$Url = 'https://graph.microsoft.com/beta/deviceAppManagement/managedAppPolicies'
Write-Verbose -Message "Creating new iOS App Protection policy with JSON payload: `r`n$JSONContent"
Invoke-MSGraphRequest -HttpMethod POST `
Invoke-MgGraphRequest -HttpMethod POST `
-Url $Url `
-Content $JSONContent `
-Headers @{"Content-Type" = "application/json" } | Out-Null
Expand Down Expand Up @@ -946,7 +946,7 @@ function Set-M365DSCIntuneAppProtectionPolicyiOS
{
$Url = "https://graph.microsoft.com/beta/deviceAppManagement/iosManagedAppProtections('$PolicyId')/"
Write-Verbose -Message "Creating new iOS App Protection policy with JSON payload: `r`n$JSONContent"
Invoke-MSGraphRequest -HttpMethod PATCH `
Invoke-MgGraphRequest -HttpMethod PATCH `
-Url $Url `
-Content $JSONContent `
-Headers @{"Content-Type" = "application/json" } | Out-Null
Expand Down Expand Up @@ -977,7 +977,7 @@ function Set-M365DSCIntuneAppProtectionPolicyiOSApps
{
$Url = "https://graph.microsoft.com/beta/deviceAppManagement/managedAppPolicies/$PolicyId/targetApps"
Write-Verbose -Message "Updating Apps for iOS App Protection policy with JSON payload: `r`n$JSONContent"
Invoke-MSGraphRequest -HttpMethod POST `
Invoke-MgGraphRequest -HttpMethod POST `
-Url $Url `
-Content $JSONContent `
-Headers @{"Content-Type" = "application/json" } | Out-Null
Expand Down Expand Up @@ -1008,7 +1008,7 @@ function Set-M365DSCIntuneAppProtectionPolicyiOSAssignment
{
$Url = "https://graph.microsoft.com/beta/deviceAppManagement/iosManagedAppProtections('$PolicyId')/assign"
Write-Verbose -Message "Group Assignment for iOS App Protection policy with JSON payload: `r`n$JSONContent"
Invoke-MSGraphRequest -HttpMethod POST `
Invoke-MgGraphRequest -HttpMethod POST `
-Url $Url `
-Content $JSONContent `
-Headers @{"Content-Type" = "application/json" } | Out-Null
Expand Down
11 changes: 7 additions & 4 deletions Modules/Microsoft365DSC/Microsoft365DSC.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 2021-11-17
# Generated on: 2021-11-18

@{

# Script module or binary module file associated with this manifest.
# RootModule = ''

# Version number of this module.
ModuleVersion = '1.21.1117.1'
ModuleVersion = '1.21.1117.2'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -203,14 +203,17 @@
IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true'

# ReleaseNotes of this module
ReleaseNotes = "* EXOTransportRule
ReleaseNotes = "
* EXOTransportRule
* Fixed issues with invalid State property and missing Enabled one;
ISSUE #1554;
* IntuneDeviceCompliancePolicyAndroidDeviceOwner
* Initial release;
* DEPENDENCIES
* Updated DSCParser to version 1.3.0.2;
* Updated MSCloudLoginAssistant to version 1.0.78;"
* Updated MSCloudLoginAssistant to version 1.0.78;
* MISC
* Fixes old Intune Graph Request cmdlet name;"

# Flag to indicate whether the module requires explicit user acceptance for install/update
# RequireLicenseAcceptance = $false
Expand Down
8 changes: 4 additions & 4 deletions Tests/Unit/Stubs/Microsoft365.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -9535,25 +9535,25 @@ function Get-Organization
$organizationId
)
}
function Invoke-MSGraphRequest
function Invoke-MgGraphRequest
{
[CmdletBinding()]
param(
[Parameter()]
[System.String]
$HttpMethod,
$Method,

[Parameter()]
[System.Object]
$Content,
$Body,

[Parameter()]
[System.Object]
$Headers,

[Parameter()]
[System.String]
$Url
$Uri
)
}
function New-Organization
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/docs/Images/AzureAD.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/docs/Images/Intune.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/docs/Images/Office365.jpg
Binary file added docs/docs/Images/OneDrive.jpg
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/docs/Images/Planner.png
Binary file added docs/docs/Images/PowerApps.png
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/docs/Images/SecurityAndCompliance.png
File renamed without changes
File renamed without changes
Binary file added docs/docs/Images/SharePoint.jpg
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/docs/Images/Teams.jpg
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
14 changes: 7 additions & 7 deletions docs/docs/concepts/odsp-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ All SharePoint and OneDrive resources work with the SharePoint Admin role assign

When executing the Export-M365DSCConfiguration cmdlet user name and password should be filled in the following fields:

![User name and Password](../images/userpwdpng.png "Username and Password")
![User name and Password](../Images/userpwdpng.png 'Username and Password')

## Azure AD app permissions

The best option when using Microsoft365DSC with SharePoint and OneDrive is to use an Azure AD app principal. When using AAD App permission Microsoft365DSC supports 2 different scenarios, certificate path option or installing certificate and using the thumbprint. The permissions required for Azure AD applications are SharePoint Site.FullControl.All scope.

![API Permissions](../images/APIPermissions.png "SharePoint Permissions")
![API Permissions](../Images/APIPermissions.png 'SharePoint Permissions')

### Configure AzureAD app for Microsoft365DSC

Expand All @@ -42,7 +42,7 @@ Initialize-PnPPowerShellAuthentication -ApplicationName TestApp2 -Tenant contoso

This cmdlet will open a dialog box to authenticate to Azure AD and grant admin consent once its created the AzureAD app. It will also install
the certificate in current user store and output a PFX file in the c:\dsc directory. If you plan to use the certificate thumbprint option when using
DSC by default the LCM runs under the system account so easiest option to install in cert store is by using [PSExec](https://docs.microsoft.com/en-us/sysinternals/downloads/psexec). To install certificate under system account using PSExec run the following:
DSC by default the LCM runs under the system account so easiest option to install in cert store is by using [PSExec](https://docs.microsoft.com/en-us/sysinternals/downloads/psexec). To install certificate under system account using PSExec run the following:

1. .\PsExec.exe -s -i mmc.exe
2. File add / remove snapin > Select certificates > MyUser account
Expand All @@ -52,9 +52,9 @@ DSC by default the LCM runs under the system account so easiest option to instal
After AzureAD app is created and certificate is installed you need some additional properties before you can use with Microsoft365DSC. Login to
Azure Active Directory and browse to the App registrations page you should see the TestApp2 app created from the script above. We need to copy the following properties:

![Application Id](../images/AppId.png "Application ID")
![Application Id](../Images/AppId.png 'Application ID')

![Certificate Thumbprint](../images/CertificateThump.png "Certificate Thumbprint")
![Certificate Thumbprint](../Images/CertificateThump.png 'Certificate Thumbprint')

### Using Certificate Thumbprint option

Expand All @@ -67,7 +67,7 @@ when using certificate thumbprint.

From the Export-M365DSCConfiguration GUI the following fields should be used:

![ExportThumprint](../images/ExportCertThumb.png "Export using thumbprint")
![ExportThumprint](../Images/ExportCertThumb.png 'Export using thumbprint')

### Using Certificate Path option

Expand All @@ -81,4 +81,4 @@ would be the best solution. The following parameters are required when using cer

From the Export-M365DSCConfiguration GUI the following fields should be used:

![Export using Certificate Path](../images/CertPath.png){ align=center width=500 }
![Export using Certificate Path](../Images/CertPath.png){ align=center width=500 }
Loading

0 comments on commit 5768de4

Please sign in to comment.