node-sp-auth icon indicating copy to clipboard operation
node-sp-auth copied to clipboard

I am getting securtiy token response error .

Open sufiyan1234 opened this issue 3 years ago • 2 comments

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)

sufiyan1234 avatar Apr 07 '22 04:04 sufiyan1234

I am getting similar issue. Did you find any solution??

rak-dev avatar Sep 09 '22 07:09 rak-dev

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.

koltyakov avatar Sep 09 '22 09:09 koltyakov