Most common automation requests and how to solve them: Ep. 1

Every month I receive requests from partners via email, Twitter, LinkedIn, support cases, Automation Office Hours, phone calls, meetings, and more. Often, many of them want to know what others are asking about automation, and what I recommend they do. I thought, “Why not put that in a blog?” So this new series will be a review of some of the most common questions I’m asked, and how I answer them.

I’m creating a Microsoft 365 automation policy. How do I link the username and password so I can supply it in N‑central?

This is something we cover in our Automation Boot Camps. You can register for the next one here. Having said that, this one is really quite simple. You can do it two different ways, depending on whether you write your own PowerShell script within Automation Manager or use the native Microsoft 365 objects.

If you’re using your own PowerShell script:

  1. Start by creating a new policy
  2. Then click on the Input button to create input parameters:
    You will need to add two different parameter types: a string parameter for the username and email, and a password parameter for the password

  1. Once you have created these two, you will need to add the Run PowerShell Script object to the policy
  2. Next, click on the Add button on the object, and you’ll be given the option to create an input parameter for the script itself
    a. In here you will need to create two different parameters types: a string parameter for the username, and a password parameter for the password
    b. As you create them, make sure to use a different name from the one you used in the policy input parameter to avoid any conflicts
    c. Once you have created the parameters, the chain-link button allows you to link the parameters to the policy input

  1. Once you’ve done that for both parameters, you can click on the Script tab and insert your own script
  2. The policy will display the parameters so you can copy and paste them into your script and link them to any existing parameters

 

Once you’ve done this you are essentially good to go. The parameters will be requested in SolarWinds® N‑central®, and they can be linked to a custom property, a cloud credential, or to device credentials.

One thing to note is that to link to cloud credentials, you will need to use an actual cloud object like Get Microsoft 365 license information. As long as you have at least one object that is cloud-based, it will tell N‑central this is a cloud-based policy, which will enable the cloud credential link.

If you want to simply use the Automation Manager native objects instead of your own script, you will need to go through steps 1 and 2 above, then add all the Microsoft 365 objects you want, and use the chain-link button on those objects to link the username and password to the input parameters.

That’s all for this week. Stay tuned for more use cases.

 

If you’ve created an automation policy and would like to share it with the community, please feel free to email me at [email protected].

As always, don’t forget to check the Automation Cookbook if you’re interested in other automation policies, script checks, and custom services.

 

Marc-Andre Tanguay is head automation nerd at SolarWinds MSP. You can follow him on Twitter at @automation_nerd.

Want to stay up to date?

Get the latest MSP tips, tricks, and ideas sent to your inbox each week.

Loading form....

If the form does not load in a few seconds, it is probably because your browser is using Tracking Protection. This is either an Ad Blocker plug-in or your browser is in private mode. Please allow tracking on this page to request a trial.

If this issue persists, please visit our Contact Sales page for local phone numbers.

Note: Firefox users may see a shield icon to the left of the URL in the address bar. Click on this to disable tracking protection for this session/site