As a Microsoft Partner, how to access Azure AD Domain Management API after sell customer Office 365 Product. RRS feed

  • Question

  • Hi All,
    We are a Microsoft Partner/reseller to provide our customer Microsoft products, Office 365 for example.  We are using set of reseller info (App ID, Key and domain) to communicate CSP Commerce REST API (CREST API) to create customer and subscription in Microsoft Partner console.

    Now we want to use Azure Domain Management API to help our customers to verify their domain names programmatically.
    After read a number of Docs,  we are still having some questions, hopefully we can get some help from forum and your guys.
    1.  which set of (App ID, Key and domain) shall I use?  I tried reseller info which were used for CREST API. However, I am able to get AADtoken,  but not for other further functions.  If I shall use customer set of info, where shall I get the customer (App ID, Key and domain)?
    2. From this doc, (
    As completed new customers, after they purchased Office 365 product in portal, They still need sign up Azure to use Azure portal,  Do I need to "Add an application my organization is developing"  to get the customer set (App ID, Key and domain) ?
    If yes, If there any API we can use to get this customer set (App ID, Key and domain) , as we are trying to automated the whole purchase and provision process, human intervention is the least thing we want to use :)
    Thanks very much in advance  and attached some error from Question 1.


    Question 1 Error when use reseller set info to try /tenantDetails function.

    AADToken is OK

    Request Url =
Request Body = [grant_type=client_credentials, resource=, client_id=exxxxx, client_secret=xxxxx]
AADToken = eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2dyYXBoLndpbmRvd3MubmV0IiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvYTBlZmQyZmEtOGJhNy00NTQ4LWIxM2ItZTgwY2IxYWFjMzhkLyIsImlhdCI6MTQ1NTUwOTgwMCwibmJmIjoxNDU1NTA5ODAwLCJleHAiOjE0NTU1MTM3MDAsImFwcGlkIjoiZTEzMjU3NWQtZGY4Ny00Nzc5LWIzZDctZDA0ZjU4YWE1ZDlmIiwiYXBwaWRhY3IiOiIxIiwiaWRwIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvYTBlZmQyZmEtOGJhNy00NTQ4LWIxM2ItZTgwY2IxYWFjMzhkLyIsIm9pZCI6ImQ1MzMzOGE3LWJkODUtNGQ3OS04Njk5LWNjYmRkZWFlMGU5OCIsInJvbGVzIjpbIkRpcmVjdG9yeS5SZWFkIl0sInN1YiI6ImQ1MzMzOGE3LWJkODUtNGQ3OS04Njk5LWNjYmRkZWFlMGU5OCIsInRpZCI6ImEwZWZkMmZhLThiYTctNDU0OC1iMTNiLWU4MGNiMWFhYzM4ZCIsInZlciI6IjEuMCJ9.guYOVKRtU0WsRdb-9H-5StjMR5sVLQApS9C3p9Ke7e6Cnt6QSwjgYpfNjSv_LZJy9VLjaRAKja5zicnYS4NpQzAOpgNp21V539TZ9677mN_HmRUHfbKmPGFb41Ps5r16gPlFc5osU5RPDp4oCK6EQuyypCXE0la_Y79YmLiIa0wOwKY7DgdaaNWDDsiDEMdVCFdUHgglPtOT7WakYl3bSfoa0BmHvZJGJI4TCggrixKxJGtB3n6_fWnjaTYbipNOuFMxGz1MrfYdWV6ziNeQgq1N3w-KkoVrymjyAyXLs2pkkKGNrkVJFDa-qItTR0iZT1EMRe_UBSbujd4GHdAilQ


    tenantDetails function has error

    input request,
    org.sampleapp.exceptions.SampleAppException: The identity of the calling application could not be established.
        at org.sampleapp.test.ApiTest.testgetTenantDetails(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(
        at org.junit.internal.runners.statements.RunBefores.evaluate(
        at org.junit.runners.ParentRunner.runLeaf(
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(
        at org.junit.runners.ParentRunner$
        at org.junit.runners.ParentRunner$1.schedule(
        at org.junit.runners.ParentRunner.runChildren(
        at org.junit.runners.ParentRunner.access$000(
        at org.junit.runners.ParentRunner$2.evaluate(
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
    Caused by: Server returned HTTP response code: 401 for URL:
        ... 25 more

    Monday, February 15, 2016 4:42 AM

All replies

  • Hello,


    We are working on the query and would get back to you soon on this. I apologize for the inconvenience and appreciate your time and patience in this matter.


    Best Regards,

    Kamalakar K

    Monday, February 15, 2016 4:42 PM