Hi @Valeria Naldi ,
Welcome to Microsoft Q&A forum and thanks for reaching out here.
Looking at the error message 401-Unauthorized, it seems like your Azure AD App doesn't have permission to access the ADX cluster.
Could you please make follow the below series of steps to ensure that your Azure AD App has permission to access your ADX cluster.
Please note that, after creating the application registration, there may be a several minute delay until Azure Data Explorer can reference it. If, when executing the command, you receive an error that the application is not found, wait for some time and ensure from portal that the app registration has access to ADX and try again.
In addition, kindly refer to this document to know more about cluster level permissions and database permissions.
Hope this info helps.
Please don’t forget to
Accept Answer and
Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.