I need help with MS Graph API for SharePoint. I am getting an error during retrieving the Authentication token when the password has special characters.

Prasanna Chaturvedi 0 Reputation points
2024-07-25T09:05:19.18+00:00

I need help with MS Graph API for SharePoint. I am getting an error during retrieving the Authentication token when the password has special characters. I am passing the details in the body as parameters. I tried HTML encoding and URL encoding but they both fail, probably because the controller at Microsoft end isn't configured to decode.

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
6,140 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,438 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,289 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Haoyan Xue_MSFT 22,461 Reputation points Microsoft Vendor
    2024-07-26T02:36:23.54+00:00

    Hi @Prasanna Chaturvedi ,

    What are the specifics of the reported error? In order to better help you solve the problem, if it is convenient, you can describe your problem in more detail, such as the error content and your operation steps or screenshots.

    You can try using the Microsoft Authentication Library (MSAL) for access token acquisition. Additionally, make sure that the access token is valid and that you have requested the correct set of permissions based on the Microsoft Graph APIs your app calls.

    Check to see if the solutions in this article work for you: Resolve Microsoft Graph authorization errors - Steps to resolve common errors

    Hope the information can help you. And if there have any unclear or misunderstanding, please feel free to post back and we’ll continue to help you all the time!


    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.

    0 comments No comments