Este incidente se presenta porque el asociado tuvo algún cambio reciente y no se ha procesado en sistema, o bien tiene los roles caducados.
Validamos que no tenga roles caducados, si no es así, reprocesamos el ultimo XML de update que tenga, y con este el asociado podrá loguearse correctamente.
DECLARE @User NVARCHAR(10) = '1060195'
--select * from employee where employeeno = 21556
Declare @Rol table (id nvarchar(10),RoleID nvarchar(max))
--update employee set posauth = 7 where employeeno = 80038 and payrollid = 80038
Select JobClass,Position,Tabadge,TermDate,PosAuth,JobTitle,RightHanded,EmpStatus,DatePswdChng, * from Employee where Payrollid = @User
select Substring(@@servername,6,4) 'Tienda'
--Consulta de Roles por Usuario
SELECT u.UserName, r.Name, ur.[ExpireDate],r.code,ur.userid,ur.Roleid,u.PasswordHash
FROM AspNetUserRoles ur
INNER JOIN AspNetUsers u ON ur.UserId = u.Id AND u.Id = (SELECT id FROM AspNetUsers WHERE username = @User)
INNER JOIN AspNetRoles r ON ur.RoleId = r.Id
--validar si el asociado ingresa a sms
select * from systemlog where logmessage like '%825283%'
-- Tabla de Logs, error con el usuario
Select 'Systemlog E' 'Systemlog E',* From thd_sms_logs.Dbo.Systemlog NoLock where logdate >= convert(date,getdate()) and progname = 'auth' and logmessage like Concat('%',@user,'%') Union All Select 'Systemlog E',* From Systemlog NoLock where logdate >= convert(date,getdate()) and progname = 'auth' and logmessage like Concat('%',@user,'%')
-- Tabla de Logs, error al procesar empleado
Select 'Systemlog P' 'Systemlog P', * From thd_sms_logs.Dbo.Systemlog NoLock where logdate >= convert(date,getdate()) and progname = 'spEmployeeProvisioning' Union all Select 'Systemlog P', * From Systemlog NoLock where logdate >= convert(date,getdate()) and progname = 'spEmployeeProvisioning'
-- Tabla de XML enviados de ITX a SMS para Empleados
Select 'InboundMessages' 'InboundMessages', * from thd_sms_logs.Dbo.InboundMessages NoLock where InterfaceID = 'I109' and payload like concat('%',@user,'%') Union All Select 'InboundMessages' 'InboundMessages', * from InboundMessages NoLock where InterfaceID = 'I109' and payload like concat('%',@user,'%')
-- Reproceso de XML
--exec spEmployeeProvisioning ''
En caso de que no exista algún XML debemos de solicitar a Diana de León
