The solution involves, Granting the service principal permissions to use the resource that's mentioned in the error message
The following document will help to solve that
role-assignments-portal
----------
--please don't forget to upvote
and Accept as answer
if the reply is helpful--