Forum Discussion
Power Bi Rest Api --> invalid_client; Error code - 7000218
Hi,
Trying to execute the rest API for authentication getting following error.
{
"error": "invalid_client",
"error_description": "AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.\r\nTrace ID: d0c4e0cc-9c95-4d87-96c1-bb8f968b3800\r\nCorrelation ID: 8564a3c5-7c93-4303-a276-d9ff0ff9a9df\r\nTimestamp: 2021-07-08 19:20:57Z",
"error_codes": [
7000218
],
"timestamp": "2021-07-08 19:20:57Z",
"trace_id": "d0c4e0cc-9c95-4d87-96c1-bb8f968b3800",
"correlation_id": "8564a3c5-7c93-4303-a276-d9ff0ff9a9df",
"error_uri": "https://login.microsoftonline.com/error?code=7000218"
}
Any Help appreciated.
1 Reply
- V-lianl-msftCommunity Support
Do you register a client application in azure ad?What type is the AAD registered Application in your case?
If the clientId is from a "Server-side Web app", then specify an extra option -clientsercet. Otherwise register a "Native app" and use the clientid alone.
It is suggested that you could take a look at following tutorial about invoke power bi rest API and get access tokens:
https://docs.microsoft.com/en-us/power-bi/developer/embedded/get-azuread-access-token