0

I am using adal-node package in my Nodejs app for authenticating against Azure AD. URL: https://www.npmjs.org/package/adal-node

I am using acquireTokenWithAuthorizationCode method to get the token and it works fine. When my auth code expires, I want to refresh my token using the below. authenticationContext.acquireTokenWithRefreshToken(_tokenData.refreshToken, authdata.clientId, authdata.resource, callback).

But when I run this code, its giving me the below error. "Get Token request returned http error: 400 and server response: {"error":"invalid_request","error_description":"AADSTS90014: The request body must contain the following parameter: 'client_secret or client_assertion'

The method will not accept client secret as its argument, but still it complains that it needs a client secret.

Can you please help?

Thanks Anil

4

1 回答 1

0

不幸的是,该库现在不支持您的方案。您正在使用的函数 acquireTokenWithRefreshToken 适用于不需要客户端密码的 OAuth 公共客户端,但您的应用程序是一个需要客户端密码的 OAuth 机密客户端。

我在 GitHub 存储库中提交了以下问题,以跟踪添加支持您的方案的新方法的需求。

https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/issues/22

于 2014-10-31T20:59:02.923 回答