Where can I find the LAW Primary Key?

Scott Miles 20 Reputation points
2025-12-01T05:49:46.21+00:00

Hello all,

I am trying to send logic app output from a rest API query into a LAW to be ingested into Sentinel.

The send data portion in the logic app requires workspace ID and Primary Key for the target LAW.

I have looked at the agent page:
User's image

I have also looked at the legacy agent management:

User's image

I can't for the life of me find the primary key.

Any help would be appreciated!

Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

Answer accepted by question author
Siddhesh Desai 8,210 Reputation points Microsoft External Staff Moderator
2025-12-01T06:15:57.82+00:00

Hi Scott Miles

Thank you for reaching out to Microsoft Q&A

The Log analytics Primary key was not visible in Portal in Agents section for me as well.

As a workaround, you can use below Azure CLI command to fetch the Primary Key.

I have run this command in the Cloud Shell:

az monitor log-analytics workspace get-shared-keys \
   --resource-group xxxxx \
   --workspace-name xxxxxx \
   --query "primarySharedKey"

Output-User's image

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more