Business Central: Renewing OAuth Token

pkahlen
Member Posts: 5
in General Chat
Hello all,
I am facing the following problem:
We have a web application (built with PHP and Symfony) that exchanges data with Business Central via SOAP web service. Since the SOAP web services are to be removed, we are currently converting the application to OAuth2 and (JSON) API calls.
An app is also already registered in the Azure Portal. My problem is that the token needed for authentication always has a duration of only 1-2 hours, after which it has to be renewed again.
Is there any way to get a new token without visually logging into Microsoft? Because the problem is that the data exchange of web application and BC with a service user must take place on machine/source level. So manual input of user data is not possible.
Kind regards,
Philip
I am facing the following problem:
We have a web application (built with PHP and Symfony) that exchanges data with Business Central via SOAP web service. Since the SOAP web services are to be removed, we are currently converting the application to OAuth2 and (JSON) API calls.
An app is also already registered in the Azure Portal. My problem is that the token needed for authentication always has a duration of only 1-2 hours, after which it has to be renewed again.
Is there any way to get a new token without visually logging into Microsoft? Because the problem is that the data exchange of web application and BC with a service user must take place on machine/source level. So manual input of user data is not possible.
Kind regards,
Philip
0
Best Answer
-
You should create a Azure App registering and set it up as application permissions, then it is System-To-System and no user action is required:
https://www.kauffmann.nl/2021/07/06/service-to-service-authentication-in-business-central-18-3-how-to-set-up/
For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.1
Answers
-
You should create a Azure App registering and set it up as application permissions, then it is System-To-System and no user action is required:
https://www.kauffmann.nl/2021/07/06/service-to-service-authentication-in-business-central-18-3-how-to-set-up/
For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.1 -
Thanks SanderDK - that helps a lot!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions