what is the error?
the licence is for per tenant and not user based.
you also need to grant directory.read.all permission.
can you share code
what is the error?