Achieving active control of the flow of light in nanoscale photonic devices is of fundamental interest in nanophotonics. For practical implementations of active nanophotonic devices, it is important to determine the sensitivity of the device properties to the refractive index of the active material. Here, we introduce a method for the sensitivity analysis of active nanophotonic waveguide devices to variations in the dielectric permittivity of the active material. More specifically, we present an analytical adjoint sensitivity method for the power transmission coefficient of nanophotonic devices, which is directly derived from Maxwell’s equations, and is not based on any specific numerical discretization method. We show that in the case of symmetric devices the method does not require any additional simulations. We apply the derived theory to calculate the sensitivity of the power transmission coefficient with respect to the real and imaginary parts of the dielectric permittivity of the active material for both two-dimensional and three-dimensional plasmonic devices. We consider Fabry-Perot cavity switches consisting of a plasmonic waveguide coupled to a cavity resonator which is filled with an active material with tunable refractive index. To validate our method, we compare it with the direct approach, in which the sensitivity is calculated numerically by varying the dielectric permittivity of the active material, and approximating the derivative using a finite difference. We find that the results obtained with our method are in excellent agreement with the ones obtained by the direct approach. In addition, our method is accurate for both lossless and lossy devices.