Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Get Token Request failing with AADSTS7000218

$
0
0

Hi,

I am using the sample provided at https://github.com/microsoft/PowerBI-Node and use the correct application ID along with the below config defined in the Jason config file.

{
    "authorityUrl" : "https://login.microsoftonline.com/common/",
    "resourceUrl" : "https://analysis.windows.net/powerbi/api",
    "apiUrl" : "https://api.powerbi.com/",
    "appId" : "",
    "workspaceId" : "",
    "reportId" : "",
    "username" : "",
    "password" : ""
}

But when this method is called 


    // use user credentials and appId to get an aad token
    let promise = () => { return new Promise(
        (resolve, reject) => {
            context.acquireTokenWithUsernamePassword(config.resourceUrl, config.username, config.password, config.appId , function(err, tokenResponse) {
                if (err) reject(err);
                resolve(tokenResponse);
            })
        });
    };

then It throw this error.

Get Token request returned http error: 401 and server response: {"error":"invalid_client","error_description":"AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.\r\nTrace ID: 6560c4b9-fe40-4120-ab2a-921956300000\r\nCorrelation ID: fd7fb0dd-e345-4206-b426-d121000f7393\r\nTimestamp: 2019-08-02 19:14:41Z","error_codes":[7000218],"timestamp":"2019-08-02 19:14:41Z","trace_id":"6560c4b9-fe40-4120-ab2a-921956300000","correlation_id":"fd7fb0dd-e345-4206-b426-d121000f7393"}

I do not understand why it is asking for client Secret because there is no option provided in this to specific client secret. Not sure where I need to specify that . Now sure How can we make this sample work.

I have use Azure Portal to register the App and assigning permission to PowerBI but that also did not worked and throwing the same error.

Any help would be really appreciated.

Regards
Rajaniesh



Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>