How to pass Global Variables in Azure Pipeline with Newman

Anyone have experience in passing global variables from an Azure Pipeline to a Global variables file, or some other method?

What I currently have set up:
I have a pipeline in Azure that runs newman tests, then posts the results to Runs with JUnit. All this works great.

Im writing some new tests that work great in postman. They go like this:
POST request to create a new contact. The body returns an ID, which I store as a contactId Global
GET request with the contacts/{{contactId}} appended to verify the creation
PUT request with the {{contactId}} to updated the contact
etc. In Azure Pipelines with Newman, I am not sure how to replicate this.

What I have tried
I have tried using the -g globals.json export-globals commands, and cannot get the pipeline to write to the globals file in our Azure Repo.

If anyone has accomplished this or similar, or has any advice on how to make it work or a better way to do it, I would greatly appreciate it!