Securely register VM to State configuration (DSC) in Azure

I have a working script to create an azure VM and register this to as a node under the State configuration (DSC) in Azure automation account. However, within the script I have specified the access key. I am wondering if its possible to do this without having the key there and possibly retrieve the key from a azure vault or alternative secure means?