I am getting securtiy token response error .
spauth.getAuth("https://[company].sharepoint.com", { username: "[]@[company].onmicrosoft.com", password: "[]", online: true }) new Error(securityTokenResponse.toString())
C:\Users\Admin\Desktop\try\node_modules\node-sp-auth\lib\src\auth\resolvers\OnlineUserCredentials.js:154 throw new Error(securityTokenResponse.toString()); ^
Error: <S:Fault> <S:Code> <S:Value>S:Sender</S:Value> <S:Subcode> <S:Value>wst:FailedAuthentication</S:Value> </S:Subcode> </S:Code> <S:Reason> <S:Text xml:lang="en-US">Authentication Failure</S:Text> </S:Reason> <S:Detail> <psf:error xmlns:psf="http://schemas.microsoft.com/Passport/SoapServices/SOAPFault"> psf:value0x80048823</psf:value> psf:internalerror psf:code0x80048823</psf:code> psf:textAADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance.</psf:text> </psf:internalerror> </psf:error> </S:Detail> </S:Fault> at OnlineUserCredentials.postToken (C:\Users\Admin\Desktop\try\node_modules\node-sp-auth\lib\src\auth\resolvers\OnlineUserCredentials.js:154:19) at C:\Users\Admin\Desktop\try\node_modules\node-sp-auth\lib\src\auth\resolvers\OnlineUserCredentials.js:48:25 at processTicksAndRejections (node:internal/process/task_queues:96:5)
I am getting similar issue. Did you find any solution??
AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance.
You can't get around CAS. It's configuration rules blocks external authentication. You could reach your tenant admins or try alternative authentication methods, maybe Add-in or On-Demand.