Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Using a Non-interactiv...
Sales forum
Suggested answer

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

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!
Categories:
  • Aidan Rosamond Profile Picture
    Aidan Rosamond 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
    RudyZhang 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
    Mahendar Pal 45,041 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.
     
     

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans