Hi Mike,
Thanks for reaching out to Microsoft Q&A.
You can use below command to fetch Log Analytics workspace keys using azure cli:
az monitor log-analytics workspace get-shared-keys --resource-group <ResourceGroup> --workspace-name <loganalyticsname> --query "{primaryKey: primarySharedKey, secondaryKey: secondarySharedKey}"
I tried the same and able to fetch both Primary Key and Secondary Key of log analytics workspace as below:
Hope it helps!
Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.
If you have any other questions, let me know in the "comments" and I would be happy to help you.