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 :
Microsoft Dynamics CRM (Archived)

Authenticate get access token by Java

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to use Java to get access token after administrator registered an APP on Azure Active Directory, I've got the application id and resource url.  I still need an account when I use the JavaAPI to get the access token, for example:

Screen_2D00_Shot_2D00_2017_2D00_03_2D00_09_2D00_at_2D00_2.46.35_2D00_PM.png

I used third party library(http://mvnrepository.com/artifact/com.microsoft.azure/adal4j) above, I would like to know the type of this account and the information related to the permission role, It seems that no additional accounts are required in your C# example(https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/connect-customer-engagement-web-services-using-oauth#authenticate-using-adal), but the Java API is rrquired. 

So, in fact, what I want to know is the type and permissions of this account when I use the JavaAPI to get Token.

Thanks,

Evan Pu

*This post is locked for comments

I have the same question (0)
  • Rajesh Chungath Profile Picture
    467 on at

    You can use any account which have required access on CRM to perform the business operations. It is completely depend on what are the actions you are going to perform using this access token.  The account can be a service account or full access account.

  • Community Member Profile Picture
    on at

    Hi Rajesh,

    Thanks for your reply, we want to synchronize some of the data we are interested in such as contacts, opportunities to our third-party applications, I don't know what you mean of the 'service account', because I haven't used the Dynamics 365 CRM Online, do you have any Suggestions?

    Thanks,

    Evan Pu

  • Suggested answer
    PranavShroti Profile Picture
    4,510 on at

    Hi Evan,

    I have never used JavaAPI, however conceptually speaking, you need to pass the user name which has access to registered app in Azure Active Directory. User should have admin access on that app as well.

    For registering your app in ADD, the user who is registering the application must have a Dynamics 365 (online) user account with System Administrator security role and the global administrator role for the Office 365 subscription.

    Regards,

    Pranav

    If found useful, please mark the answer as verified

  • Verified answer
    Rajesh Chungath Profile Picture
    467 on at

    Hi Evan,

    To create a service user, First you should assign CRM license to a 365 user then login to CRM instance as Administrator and open the user profile and navigate to the administration tab the set client access license (CAL) Information. (Access Mode : Non-Interactive). Assign required security roles to the user.

    usersettings.PNG

    After this configuration you can remove CRM license from the user. (Up to 5 service users are supported). Service user can make API communication with Dynamics CRM.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans