Please try granting User.Read.All or Directory.Read.All application permissions to your app to get a list of users in the tenant as suggested in the following post: Rest call failed with client error, status code 403 Forbidden, please check your activity settings - Microsoft Q&A
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.