Get the following error when using Office 365 management API RRS feed

  • Question

  • Hi team,

    i am developing an app that using Office 365 management API. I am using Client credential flow for authentication, i am able to get the token. 

    •  register app and set permission

    • acquire tokens

    However when i start a subscription, it gets the following error:

    the full msg is:

    "code": "StartSubscription [TenantId=xxxxxxxxx,ContentType=Audit.SharePoint,ApplicationId=xxxxxxxxx,PublisherId=xxxxxxxxx] failed. Exception",
    "message": "Microsoft.Office.Compliance.Audit.DataServiceException: Tenant xxxxxxxxxxxx does not exist.\r\n at Microsoft.Office.Compliance.Audit.API.AzureManager.GetSubscriptionTableClientForTenant(Guid tenantID, Boolean throwIfTenantNull)\r\n at Microsoft.Office.Compliance.Audit.API.AzureManager.<GetAPISubscriptionAsync>d__22.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Office.Compliance.Audit.API.StartController.<StartSubscription>d__0.MoveNext()"

    this error only occurs on some developer subscription.  can some one help me?



    • Edited by 10120 Thursday, July 25, 2019 8:12 AM
    Thursday, July 25, 2019 8:09 AM

All replies

  • Hi

    Since the message tells tenant does not exist.

    What is the PublisherIdentifier you pass? From the link you provided, only this parameter refers to tenant GUID.

    Justin Liu Office Apps & Services MVP, MCSE
    Senior Software Engineer
    Please Vote and Mark as Answer if it helps you.

    Thursday, July 25, 2019 9:27 AM
  • PublisherIdentifier  is the same as  tenant id.      this tenant does exist , i am able to get access token from this tenant.


    Friday, July 26, 2019 2:31 AM