web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to authenticate with D365 to send GET requests from Python scripts

(0) ShareShare
ReportReport
Posted on by 5

I am trying to write python scripts to get info from our CRM. I get lots of 401 responses when I try to pass my credentials. 

How do I create tokens (with the client ID and secret) using Python and what would a Python script look like that creates a token and sends a GET request to get our CRM incidents? 

Thank you!

I have the same question (0)
  • Suggested answer
    Francisco Murtinheira Profile Picture
    Microsoft Employee on at

    Hello,

    In order to authenticate with Dynamics, you first need to register an application in Azure, to obtain your authentication token from.

    This article explains how to achieve that:

    community.dynamics.com/.../register-dynamics-crm-app-with-azure-for-oauth-2-0-authentication

    After obtaining the Client Id from the Azure App, you can build a request that gets the authentication token from Azure and starts performing your requests.

    The following article goes over how to do this via Python:

    alexanderdevelopment.net/.../

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans