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

Using a Non-interactive service account to run a python script

(0) ShareShare
ReportReport
Posted on by 14
Hey,
 
I've been working on a script to call the Microsoft API to make some changes to D365. But after I registered the application in Azure and ran the script I got an error telling me I needed to create a application user. Rather than burning a license to create a application user is there anyway I could use a service account to run the script?
 
Thank you in advance!
I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    Hi ,
     
    You should not have any issue with App user, I am sure you have done but just to reconfirm - Are you sure you have added app user into Dynamics and provided a required security role. 
     
    We have been using app user for different integration without any issue.
     
     
  • RudyZhang Profile Picture
    Microsoft Employee on at
    Hi,
     
    Regarding your mention about the need to run python scripts in Dynamics365 using a non-interactive service account
     
    According to the official Microsoft documentation you can Use Service-to-Service (S2S) Authentication, which enables external and non-interactive users to access the Business Center online.

     
    The link to the documentation is as follows
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/administration/automation-apis-using-s2s-authentication#main-usage-scenarios
     
    Additionally, you can use the Dynamics 355 Api with the package dynamics365crm-python, which is hosted on Pypi at the following link
    https://pypi.org/project/dynamics365crm-python/
     
     
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Rudy Zhang
  • Aidan Rosamond Profile Picture
    14 on at
    Hey after reading the S2S documentation(thanks @RudyZhang) it mentions setting up the Azure app in Business Central. We only have Sales Professional so could someone point out how I would connect the Azure registered app and the Service Account in D365 Sales Professional? 
     
    Also to answer @Mahendar_Pal I did not setup a application user because our IT department handles applying licences and creating users and it takes a while for them to create those users. It is my understanding that a Application user needs a full license where a service account does not.

    I appreciate your help! 

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans