Category Archives: SCCM Current Branch

Sync SCCM CB 1906 Collection membership to Azure AD groups

In the recently released 1906 version for SCCM Current Branch, you can now synchronize collection memberships to an Azure AD Group. This is really useful to take advantage of SCCM’s powerful collection membership queries that we can’t do today in Azure.

For more info, see https://docs.microsoft.com/en-us/sccm/core/clients/manage/collections/create-collections#bkmk_aadcollsync

In this post I have tested it out in my lab with:

  • Hybrid Azure AD join set up using Azure AD Connect syncing my computers to Azure AD. The devices in my collection have synchronized to Azure AD.
  • Azure AD Tenant added to Azure Services in SCCM and Azure AD User Discovery enabled
  • An existing group already created in Azure AD. I will use this to sync the collection members to

This is a pre-release feature of SCCM Current Branch 1906, it needs to be turned on.

2019-07-25_16-22-44

Once the feature has been turned on, you need to go to your Azure AD tenant in Azure Services, and Enable Azure Active Directory Group Sync.

2019-07-25_16-27-22

In my test collection, I have some devices that are co-managed and already exist in Azure AD. If you go to the properties of the collection, you will see a tab AAD Group Sync. Click on Add.

2019-07-25_16-32-14

Click on Search and then you will be prompted to login to your Azure tenant and then select the existing group in Azure AD.

2019-07-25_16-34-07

Click on Apply.

2019-07-25_16-34-26

The Azure AD synchronization happens every five minutes. It’s a one-way process, from SCCM to Azure AD.

Otherwise you can manually synchronize the collection to Azure AD, by right clicking on the collection and selecting Synchronize Membership (this is greyed out on collections that don’t have AAD Group Sync enabled)

2019-07-27_12-08-32

If I check the group in Azure AD, I can now see my collection members.

2019-07-25_17-05-03

Advertisements

CMG – Post to http://.COM/CCM_Proxy_MutualAuth//ccm_system/request failed with 0x87d00231.

Following up on a similar post I did here about requiring Azure AD User Discovery and Active Directory user discovery so Windows 10 machines can communicate over the CMG using Hybrid Azure Active Directory  – https://nhogarth.net/2018/10/26/sccm-1806-cmg-hybrid-azure-ad-failed-to-get-ccm-access-token/

You may run into an issue where a specific Windows 10 client cannot communicate with the CMG. In ccmmessaging.log you will see “Post to http://<CMG&gt;.COM/CCM_Proxy_MutualAuth/<ID>/ccm_system/request failed with 0x87d00231.”

You can run through the CMG Connection Analyzer to confirm that everything is working fine.

cmg01

Then you realise it is something on the Windows 10 device end.

If you run “dsregcmd /status” and see that AzureAdJoined is set to No, then you know that the device is not Hybrid Azure AD joined, thus it cannot communicate with the SCCM CMG.

cmg02

This particular machine was put in an OU that was not synced to Azure AD using Azure AD Connect. After moving it in the correct OU and doing another Azure AD Connect Sync (Start-ADSyncSyncCycle -PolicyType Delta) the device can then communicate over the CMG fine.

cmg03

SCCM Current Branch 1810 – Windows Store for Business

This post will show how you can integrate Windows Store for Business with SCCM Current Branch 1810, to sync applications and deploy WSfB applications to machines like Company Portal app.

Suggested Reading for prerequisites: Manage apps from the Microsoft Store for Business with Configuration Manager

In the SCCM console, go to Cloud Services > Azure Services > Configure Azure Services

wsfb01

Enter in the Name, and then select Microsoft Store for Business and click Next.

wsfb02

If you already have other Azure services configured in SCCM (Cloud Management Gateway for example), then it will automatically pull the server app, then you can click Next. If it doesn’t find a web app, then follow the instructions below.

wsfb17

If it doesn’t find a web app, click on Browse and we will create it.

wsfb03

Click on Create.

wsfb04

Give it a name and sign in to create the web app.

wsfb05

Click on Next.

wsfb06

Enter in a path and select your languages and click Next.

wsfb07

Now we need to login to the Microsoft Store for Business and give the web app we created before permission. Log in to https://businessstore.microsoft.com/en-gb/store and go to Manage > Settings > Distribute > Add management tool

wsfb08

Enter in the name of the web app that was either created earlier in the Azure Services wizard, or the one that you imported.

wsfb09

Click on Activate.

wsfb10

Back in the SCCM console, select the Microsoft Store for Business and click Sync from Microsoft Store for Business

wsfb11

The sync status should change to Successful.

wsfb12

You can view the WsfbSyncWorker.log for more information.

After a successful sync, you should see your MSfB apps in License Information or Store Apps.

wsfb13

To deploy one of these apps, right click on the app and select Create Application and then follow through the wizard.

wsfb14

wsfb15

The application will then appear in the Applications section. You can now deploy it as normal.

wsfb16

Further reading: Manage apps from the Microsoft Store for Business with Configuration Manager

SCCM Current Branch – Currently logged on user in Console not displaying

One of the new features that came out in SCCM Current Branch 1806 was the ability for the SCCM console to show the currently logged on user.

I had an issue where this field was blank. First thing I checked was that the SCCM client on the device was up to date (1806 or later)

On all clients, in the ccmmessaging.log I noticed:

No reply message from Server. Server may be temporarily down or a transient network error.
Post to http://<mp>/ccm_system_windowsauth/request failed with 0x8000000a.

Then when checking the IIS status codes on the Management Point IIS logs it said:

CCM_POST /ccm_system_windowsauth/request 401.2 (401.2 – Logon failed due to server configuration.)
CCM_POST /ccm_system_windowsauth/request 500.0 (500.0 – Module or ISAPI error occurred.)

This was due to Active Directory User Discovery being disabled in my site.

2019-01-18_9-52-32

Once it was enabled and the users were discovered, the errors went away in the ccmmessaging.log and as well as the MP IIS logs. Now the Last logged on username appears in the ConfigMgr console.

2019-01-18_11-27-54

SCCM Co-management – MDM enrollment failed with error code 0xcaa9001f ‘Integrated Windows authentication supported only in federation flow.’

Recently I was setting up Co-Management in SCCM Current Branch 1810. I was having issues with clients not being enrolled into Intune.

First I confirmed that the device was Hybrid Azure AD joined (this is a requirement, the device needs to be registered in Azure AD) then when looking at the CoManagementHandler.log file on the client I saw the error:

MDM enrollment failed with error code 0xcaa9001f ‘Integrated Windows authentication supported only in federation flow.’. Will retry in 240 minutes…

I found this error to be misleading. I am using Azure AD Connect with password sync, and not ADFS.

comgmt01

In my case, this error was caused by an enrollment restriction being set that blocked Windows 10 devices from being enrolled.

In Intune (portal.azure.com or devicemanagement.microsoft.com) in Device enrollment > Enrollment restrictions

In my Default restriction in Properties, then Select platforms, I had Windows (MDM) set to Block.

comgmt02

After allowing Windows (MDM) to Allow, the CoManagementHandler.log said Queuing enrollment timer to fire at 01/15/2019 21:42:19 local time

After trying again it was successfully enrolled into Intune and you can see the Managed By now says MDM/ConfigMgr Agent

comgmt03

SCCM Current Branch – Import Azure Services existing Web Apps to use same Azure subscription for CMG in different SCCM environments

This post will show how you can import the Azure Web Apps in SCCM Current Branch so you can use the same Azure hosting subscription for the CMG for different SCCM Current Branch environments. For example, you might have a Dev SCCM environment and a Production SCCM environment, and you only have one Azure Subscription, but you want to deploy a CMG in both the Dev and Prod environment.

In the SCCM Cloud Management Gateway documentation, there is an FAQ’s section here that says:

Do the user accounts have to be in the same Azure subscription as the subscription that hosts the CMG cloud service?

If your environment has more than one subscription, you can deploy CMG into any subscription that can host Azure cloud services.

This question is common in the following scenarios:

  • When you have distinct test and production Active Directory and Azure AD environments, but one single, centralized Azure hosting subscription
  • Your use of Azure has grown organically across different teams

When you’re using a Resource Manager deployment, onboard the associated Azure AD tenant. This connection allows Configuration Manager to authenticate to Azure to create, deploy, and manage the CMG.

If you’re using Azure AD authentication for the users and devices managed over the CMG, onboard that Azure AD tenant. For more information on Azure services for cloud management, see Configure Azure services. When you onboard each Azure AD tenant, a single CMG can provide Azure AD authentication for multiple tenants, regardless of the hosting location.

In the SCCM console, go to Azure Services, then Configure Azure Services.

2018-10-29_15-12-59

Give it a Name, and select Cloud Management Gateway.

2018-10-29_15-13-31

Click on Brwose next to the Web app.

2018-10-29_15-19-38

You can create a new one, or you can import the existing one. Select Import.

2018-10-29_15-20-23

Now open up your Internet browser, go to portal.azure.com, then Azure Active Directory, I am using the new preview for App Registrations, so I have selected App registrations (Preview) and selected my Server App that I want to import.

2018-10-29_15-23-00

To import this web app, copy the Display Name, Client ID, and Tenant ID.

2018-10-29_15-24-06

Also go to Certificates & secrets, and create a new client secret.

2018-10-29_15-25-32

Copy the value. We will use this later.

2018-10-29_15-26-04

Type in your Azure AD Tenant name, the Tenant ID that you copied earlier, the Application Name, Client ID, Secret Key,  Secret Key Expiry, and the App ID URI. Make sure to click the Verify button to verify that all the information is correct.

2018-10-29_15-27-03

Click on OK.

2018-10-29_15-31-14

Do the same for the Native Client app. You can follow the instructions above to get the correct values.

2018-10-29_15-32-01

Once both apps have been imported, click on Next.

2018-10-29_15-33-07

I won’t be enabling Azure AD discovery.

2018-10-29_15-33-19

Finish the rest of the wizard and the the Subscription information will be imported so you can deploy the CMG in this subscription.

2018-10-29_15-33-31

SCCM 1806 CMG – Hybrid Azure AD – Failed to get CCM access token

When using the Cloud Management Gateway in SCCM Current Branch 1806, with Hybrid Azure AD clients for authentication, you may see the following errors in ccmmessaging.log on the client:

[CCMHTTP] ERROR: URL=https://<cmgname>/CCM_Proxy_MutualAuth/<guid>/ccm_system_windowsauth/request, Port=0, Options=1216, Code=0, Text=CCM_E_NO_TOKEN_AUTH
Failed to get CCM access token and client doesn’t have PKI issued cert to use SSL. Error 0x80004005
Post to https://<cmgname>/CCM_Proxy_MutualAuth/<guid>/ccm_system_windowsauth/request failed with 0x87d00231.

2018-10-26_10-30-05

If you then check the logs on the management point, specifically CCM_STS.log, you will see:

AAD user with ID <ID> and SID is not completely discovered
Return code: 403, Description: Un-authorized request, AAD user is not discovered

2018-10-26_10-28-30

At the time of writing this post, if you are using hybrid Azure AD for authentication, you need enable both Azure AD User Discovery, and the on-premises User Discovery. You can see in the CCM_STS.log above that it says the Azure AD user is not discovered which causes the 403 error.

Once both user discovery methods have been enabled, the client can authenticate over the CMG.