web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Aidan Rosamond Profile Picture
    14 on at
    Using a Non-interactive service account to run a python script
    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! 
  • RudyZhang Profile Picture
    Microsoft Employee on at
    Using a Non-interactive service account to run a python script
    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
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    Using a Non-interactive service account to run a python script
    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.
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 141

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 132

#3
DAnny3211 Profile Picture

DAnny3211 130

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans