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

Notifications

Announcements

No record found.

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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans