Share via

How can I resolve the AuthorizationFailed error I’m encountering while connecting Microsoft Defender with Node.js?

Rohit Kumar 0 Reputation points
Feb 7, 2025, 1:03 PM

Hello,

I’m encountering this error while trying to connect Microsoft Defender with Node.js.

Despite having both Reader and Security Reader roles assigned, the issue persists. I'm unsure of the root cause.

Error Message: "The client '' with object ID '' does not have authorization to perform action 'Microsoft.Security/pricings/read' over scope '/subscriptions/' or the scope is invalid. If access was recently granted, please refresh your credentials."

Microsoft Defender for Cloud
Microsoft Defender for Cloud
An Azure service that provides threat protection for workloads running in Azure, on-premises, and in other clouds. Previously known as Azure Security Center and Azure Defender.
1,491 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.