SharePoint Rest API with OAuth and Pfx Cert: ID3035: The request was not valid or is malformed

kartrabby 0 Reputation points

Hello, Can you help me fix this?

In the past few months the the Rest API for SharePoint was successful via the Pfx Certificate method.
User's image

Now it's failing with an error!
{"error_description":"ID3035: The request was not valid or is malformed."}

I originally followed this method.

How to fix this?
User's image

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,973 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,220 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 33,486 Reputation points Microsoft Vendor

    Hi @kartrabby,

    Granting access via Azure AD App-Only covers how to register an app with app-only permissions in Azure AD and how to use that app to interact with SharePoint using PnP PowerShell and the SharePoint PnP Sites Core library. Unfortunately, this resource doesn't cover how to use the app with the "plain" REST API. The basic steps to do this would be to use the Microsoft Authentication Library (MSAL) library to get an access token and then make REST API calls with that token included in the headers of the request.

    You could refer to the nice article

    Testing client certificate authentication to Azure API Management with Postman

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.