Share via

Graph api error bulk contact update from a csv

Anonymous
2024-05-28T13:17:23+00:00

updating the contacts using   self.endpoint_base = 'https://graph.microsoft.com/v1.0/me/contacts' this api throws me an error

2024-05-24 16:24:05,765 - INFO - ClientSecretCredential.get_token succeeded
2024-05-24 16:24:05,767 - INFO - ContactManager initialized successfully
2024-05-24 16:24:05,778 - DEBUG - Starting new HTTPS connection (1): graph.microsoft.com:443
2024-05-24 16:24:06,222 - DEBUG - https://graph.microsoft.com:443 "GET /v1.0/me/contacts?$filter=emailAddresses/any(a:a/address%20eq%20'asdadarew@example.com') HTTP/1.1" 400 None
2024-05-24 16:24:06,223 - ERROR - Failed to search contacts: {"error":{"code":"BadRequest","message":"/me request is only valid with delegated authentication flow.","innerError":{"date":"2024-05-24T20:24:06","request-id":"","client-request-id":""}}

  • c

| API / Permissions name | Type | Description | Admin consent required | Status | | | :--- | :--- | :--- | :--- | :--- | :--- || Microsoft Graph (12) | | | | | | | --- | --- | --- | --- | --- | :---: | | Contacts.Read | Delegated | Read user contacts | No | Granted for | | | Contacts.Read | Application | Read contacts in all mailboxes | Yes | Granted for | | | Contacts.Read.Shared | Delegated | Read user and shared contacts | No | | | | Contacts.ReadWrite | Delegated | Have full access to user contacts | No | Granted for | | | Contacts.ReadWrite | Application | Read and write contacts in all mailboxes | Yes | Granted for | | | Contacts.ReadWrite.Shared | Delegated | Read and write user and shared contacts | No | | | | OrgContact.Read.All | Delegated | Read organizational contacts | Yes | Granted for | | | OrgContact.Read.All | Application | Read organizational contacts | Yes | Not granted | | | User.Read | Delegated | Sign in and read user profile | No | Granted for | | | User.Read.All | Delegated | Read all users' full profiles | Yes | Not granted for | | | User.Read.All | Application | Read all users' full profiles | Yes | Not granted for | | | User.ReadWrite.All | Application | Read and write all users' full profiles | Yes | Not granted for | |

Microsoft 365 and Office | Install, redeem, activate | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-05-28T13:39:41+00:00

    Dear Pavan Goud,

    Good day! Thank you for posting in the Microsoft Community. We'll be happy to help!

    Based on your description, I have a general understanding of your question, since your problem is related to Microsoft Graph, and since we are focused on technical support for Microsoft 365 Business Exchange Online, which is not professional for Microsoft Graph. For Microsoft Graph incident, to help you better and not waste more time, I recommend that you ask questions in Microsoft Graph - Microsoft Q&A. Technical engineers over there specialize in Microsoft Graph-related issues, and experts will focus on queries to further assist you.

    Thank you in advance for your understanding. Your patience and cooperation will be greatly appreciated. I hope for all the best!

    Sincerely

    Sherry | Community Moderator

    Was this answer helpful?

    0 comments No comments