0

Have tried many ways via code and Postman and no luck of getting a state of subscription like you would get via this link: https://learn.microsoft.com/en-us/rest/api/resources/subscriptions/list - here via the site you get a list of subscriptions and their "state": "Enabled" as an example.

Have no problem of getting auth tokens using scopes below but then impossible to get subscriptions list. If I use token from Microsoft site, the call in Postman to get subscriptions works fine.

The site is using Azure Active Directory OAuth2: Type: oauth2 Flow: implicit Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Using Postman I have tried getting subscriptions using these scopes along with auth token:

I guess when using the site you login as a user and password vs in the code using client app and app secret. Is this workflow even possible?

The registered app has all kinds of API permissions. Something this simple should not be so hard. The idea here is to programmatically check via console app if Subscription is "Enabled".

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Dmitri K
  • 634
  • 6
  • 13

1 Answers1

0

After debugging this via Postman it turns out to be a permissions issue where you have to add the application you created/using to authenticate to the Access Control (IAM) of the subscription. This post describes the error and resolution: The client with object id does not have authorization to perform action 'Microsoft.DataFactory/datafactories/datapipelines/read' over scope

If you have multiple capacities created then you have to add your application to all of those subscriptions. Then you will get a list and can then check each one.

Dmitri K
  • 634
  • 6
  • 13