Troubleshooting Structured Properties Ingestion Error - How to Pass Access Token for Authorization

Original Slack Thread

Hi Team, I am trying to ingest Structured Properties with command
datahub properties upsert -f metadata-ingestion/examples/structured_properties/structured_properties.yaml
but I am getting below error:
[2024-02-22 23:45:37,584] ERROR {datahub.entrypoints:201} - Command failed: ('Unable to emit metadata to DataHub GMS', {'message': '401 Client Error: Unauthorized for url: <http://localhost:8080/aspects?action=ingestProposal'}>)
How I can pass the access token with this command to authorise this request ?

Hey there! :wave: Make sure your message includes the following information if relevant, so we can help more effectively!

  1. Are you using UI or CLI for ingestion?
  2. Which DataHub version are you using? (e.g. 0.12.0)
  3. What data source(s) are you integrating with DataHub? (e.g. BigQuery)

Following for viz, I am also having the same issue

I believe that would be DATAHUB_GMS_TOKEN (see for more details