QuickNS / azure-data-share-automation

Sample code on how to automate Azure Data Share
0 stars 0 forks source link

Data share sample review (Azure function) #2

Open ydaponte opened 1 year ago

ydaponte commented 1 year ago
  1. When running the function with the service principal, it seems to point to the wrong destination share: "System.Private.CoreLib: Exception while executing function: Functions.AcceptDataShareInvitations. System.Private.CoreLib: Result: Failure Exception: HttpResponseError: (1002) properties.storageAccountName:dest-data-shareys is not a valid name.". and it creates the shared subscription in the same Source Data Share instead of in the destination Data Share. I can reproduce this if you want to see it.
  2. As the code seems to run with the logged in azure identity (my user in this case), I've created manually a data share with my user and trigger the function again. I receive an email, but seems that the invitation is sent to another tenant and subscription. But all the settings, the azure login and account set are pointing to the right subscription configuration. I can reproduce it as well.

Let me know if you recognize something off on the code or if you want to have a session so I can reproduce the behaviour. Thanks!

QuickNS commented 1 year ago

That should not be the case. The function should run with the service principal identity to which the invitation is sent to. Let me check the code. Did you create the local.settings.json file before running the function?