Thursday, 30 May 2019

Deploying Intune Connector for AD with a web proxy

I'm working on a Windows AutoPilot solution for a customer this week. This is a hybrid AD solution and the devices will join both Azure AD and the corp AD. I had previously deployed the Intune Connector for Active Directory for testing purposes and it's pretty straightforward. However it's a little different in an enterprise environment. 

I successfully installed the connector on a Windows Server 2016. However the connector never appeared in Intune. There were many errors in the ODJ Connector event logs

"We are unable to complete your request because a server-side error occurred. Please try again. [Exception Message: \"DiagnosticException: 0x0FFFFFFF. We are unable to complete your request because a server-side error occurred. Please try again.\"] [Exception Message: \"Failed to get a value for Key: OdjServiceBaseUrl\"] [Exception Message: \"The given key was not present in the dictionary.\"

The proxy log files showed no activity so clearly I needed some way to ensure that the tool was directing traffic to the proxy.

This document discusses using the tool with on-premise proxies

However, it’s really not useful as it just recommends bypassing the proxy and configuring the tool (ODJConnectorUI.exe.config and ODJConnectorSvc.exe.config) to do that. We all know that is not practical. Most enterprise customers won’t allow you to bypass the proxy so I needed a way to make the Intune Connector use the proxy.

  • Configuring the proxy in IE does not work
  • Using “netsh winhttp set proxy” does not work 
Michael Niehaus worked on this and provided the code to add to the config files.

It worked perfectly and the Intune Connector was created (you have to restart the Intune ODJConnector Service).

The documentation will be updated accordingly. 

This is the code snippet that should be added to both the ODJConnectorUI.exe.config and ODJConnectorSvc.exe.config files.

<?xml version="1.0" encoding="utf-8" ?>
      <proxy usesystemdefault="false" proxyaddress="http://contoso-proxy:3128" />  

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />


 It was good to see successful communication in the event logs

It is important to include http:// in the proxy address. We didn't at first and we spotted the following in the event logs:

":"We are unable to complete your request because a server-side error occurred. Please try again. [Exception Message: \"DiagnosticException: 0x0FFFFFFF. We are unable to complete your request because a server-side error occurred. Please try again.\"] [Exception Message: \"The ServicePointManager does not support proxies with the scheme.\"]" 

I hope this helps someone to configure the Intune Connector for Active Directory behind a web proxy.

Until next time....

Tuesday, 21 May 2019

Renew Cloud Management Gateway Certificate

It's always a good idea to purchase an SSL certificate for as long as possible to minimize renewal times. They're a pain, right. We're always a little unsure about exactly how to renew the cert. However I have quite a few customer CMGs with one year SSL certificates and they are expiring soon so I thought I better figure out the renewal process.

Firstly, you cannot see that the CMG certificate is expiring in the ConfigMgr console. I've asked the Product Group to add this as a Management Insight or at least to expose the expiration date in the console.

Usually the only way you will be reminded about the expiring certificate will be an email from your certificate vendor (DigiCert in my case).

DigiCert remind you when the certificate is expiring in 90 days. There is no penalty for renewing early. When you renew early, DigiCert adds the remaining time from your current certificate to your new certificate (up to 3 months). You don't have to wait until the day before your certificate expires just to get your money's worth.

I have received the email and can now see the "Renew now" option in the DigiCert portal.

Should I renew the cert or generate a new one?

Technically, when you renew a certificate, you are purchasing a new certificate for the domain and company. Industry standards require Certificate Authorities to hard code the expiration date into the certificates. When a certificate expires, it is no longer valid and there is no way to extend its life. So, when you "renew" your certificate, DigiCert must issue a new one to replace the expiring one. So it's not really a renewed certificate.

What does renewing mean then?

To make renewing a certificate easier, DigiCert (and other vendors) automatically includes the information from the expiring certificate in the renewal wizard. However, because you're ordering a new certificate, you can update any of the information during the order process, if needed. Note that if you change any of your organization’s information (location, etc.) you may need to provide new validation documentation to verify the changes. 

I decided to go for a new certificate.

I generated a new CSR using the vendor tool with the same details as the previous certificate.

The certificate was approved and I could download the .crt file.

I imported the .crt file into the tool to complete the process and associate with the private key.

Then I was able to export the certificate to a usable format.

Selected .pfx with the private key, entered a password......

....and the new certificate was ready.

So what now? Is it just as simple as replacing the certificate in the properties of the CMG? Yes, it is. Simply browsed to the new certificate, entered a password and clicked Apply.

You can monitor activity in the Operations logs in Azure.

Finally you can run the CMG Connection Analyzer to make sure that everything is OK.

Will the world end if the certificate expires?

Not really. Your internet clients won't break and will still have the same functionality. You just won't be able to manage them over the internet though. When you eventually add a new certificate you will not have to take any action on the clients.

I hope this helps. Until next time.....

Thursday, 2 May 2019

First look at Intune Win32 app dependencies

The ability to deploy Win32 apps using the Intune Management Extension really improved the quality of Intune app deployment to Windows 10 devices. Microsoft have now taken this one step further with the release of Win32 app dependencies this week. 

What are app dependencies?

App dependencies are applications that must be installed before your Win32 app can be installed.

How many dependencies can I have?

There is a maximum of 100 dependencies, which includes the dependencies of any included dependencies, as well as the app itself.

What kind of dependencies can I configure?

You can add Win32 apps as dependencies for other Win32 apps, only after your Win32 app has been added and uploaded to Intune. Once your Win32 app has been added, you'll see the Dependencies option on the blade for your Win32 app.

Do I have to assign dependent apps to users or devices?

You can choose whether or not to install each dependent app automatically. By default, the Automatically install option is set to Yes for each dependency. By automatically installing a dependent app, even if the dependent app is not targeted to the user or device, Intune will install the app on the device.

How does it work?

Once the Win32 app has been uploaded to Intune you will see two new options - Dependencies and Dependency Viewer.

Select Dependencies.

Select Add to add a dependency.

You are presented with a list of available Win32 apps. Select one to be a dependent app.

Choose Select.

Choose if you want the dependency to automatically install (without being assigned). Choose Add to finish the process.

Now select the Dependency Viewer to see the active dependencies. I have a simple example here but this will be very useful to see all the dependencies and even sub-dependencies.

You can remove a dependency by clicking on the ellipses (three dots) at the end of the row in the dependency list.

What else should we know?
  • The end user will see Windows Toast Notifications indicating that dependent apps are being downloaded and installed as part of the Win32 app installation process.
  • If you choose not to Automatically install a dependency, the Win32 app installation will not be attempted.
  • Each dependency will adhere to Intune Win32 app retry logic (try to install 3 times after waiting for 5 minutes) and the global re-evaluation schedule.
  • Dependencies are only applicable at the time of installing the Win32 app on the device.
  • Dependencies are not applicable for uninstalling a Win32 app.
For me this is a very useful new feature and will help to ease the transition to modern management.

Until next time....