locked
How to get azure activity or logs? RRS feed

  • Question

  • I want to get log activities from Azure. The log activities such as:

    1. file uploaded in storage account
    2. File deleted in storage account
    3. File updates in storage account
    4. Logging to azure success
    5. Logging to azure failed
      etc

    Is there any way or api I can use to get these information?

    Thursday, June 28, 2018 2:51 AM

Answers

  • Just for confirmation have did RBAC, As an owner of your Azure Storage account, you are not automatically assigned permissions to access data. You must explicitly assign yourself an RBAC role for Azure Storage. You can assign it at the level of your subscription, resource group, storage account, or container or queue.

    For example, to run the sample code on a storage account where you are an owner and under your own user identity, you must assign the RBAC role for Blob Data Contributor to yourself. Otherwise, the call to create the blob will fail with HTTP status code 403 (Forbidden). For more information, see Manage access rights to storage data with RBAC (Preview).

    • Marked as answer by GoldenE Tuesday, July 3, 2018 1:51 AM
    Friday, June 29, 2018 6:09 AM
  • Hi, I had a similar problem before a month and solve it just giving contributor role for my user on Resource Group and not only on the service.
    • Marked as answer by GoldenE Tuesday, July 3, 2018 1:51 AM
    Friday, June 29, 2018 8:31 AM

All replies

  • For activity logs of storage, please refer this linkEnabling Storage Logging and Accessing Log Data”.

    For Login success/Failed to azure, please refer this linkSign-in activity reports in the Azure Active Directory Portal”.

    please refer this link for similar quires which might be helpful to you.

    -----------------------------------------------------------------------------------------------

    If this answer was helpful, click “Mark as Answer” or “Up-Vote”. To provide additional feedback on your forum experience, click here

    • Proposed as answer by VeeraGiri Babu Thursday, June 28, 2018 7:30 AM
    Thursday, June 28, 2018 7:30 AM
  • I followed the instructions (https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad-app) to enable permission of Azure storage and I get the access token with Resource ID : https://storage.azure.com/
    When I use access token to request blob, I got 403 error. Even I use my container, I get the same result.

    The attached image are detail setting and result .

    Please help me to solve this problem.


    • Edited by GoldenE Friday, June 29, 2018 3:46 AM
    Friday, June 29, 2018 3:34 AM
  • Just for confirmation have did RBAC, As an owner of your Azure Storage account, you are not automatically assigned permissions to access data. You must explicitly assign yourself an RBAC role for Azure Storage. You can assign it at the level of your subscription, resource group, storage account, or container or queue.

    For example, to run the sample code on a storage account where you are an owner and under your own user identity, you must assign the RBAC role for Blob Data Contributor to yourself. Otherwise, the call to create the blob will fail with HTTP status code 403 (Forbidden). For more information, see Manage access rights to storage data with RBAC (Preview).

    • Marked as answer by GoldenE Tuesday, July 3, 2018 1:51 AM
    Friday, June 29, 2018 6:09 AM
  • After I assigned RBAC role for Contributor, this role have higher permission if I am not mistaken, to my webApp, I still get the same HTTP status code 403 result.
    I use https://login.microsoftonline.com/{tenant-id}/oauth2/Token and ResourceID https://storage.azure.com/ to get accessToken



    • Edited by GoldenE Friday, June 29, 2018 8:40 AM
    Friday, June 29, 2018 8:09 AM
  • Hi, I had a similar problem before a month and solve it just giving contributor role for my user on Resource Group and not only on the service.
    • Marked as answer by GoldenE Tuesday, July 3, 2018 1:51 AM
    Friday, June 29, 2018 8:31 AM
  • Hi, Thank you for the answer. I can get logs now.
    Tuesday, July 3, 2018 1:51 AM
  • Glad to know, it helped.
    Tuesday, July 3, 2018 10:56 AM
  • I have another question. How to get logs of file share in storage account?

    And I can't get sign-in messag. Can I get the sign-in logs with api?


    • Edited by GoldenE Wednesday, July 4, 2018 6:55 AM
    Wednesday, July 4, 2018 5:17 AM
  • Storage Analytics logging is currently available only for the Blob, Queue, and Table services.
    For more information please refer this document.
    Sign-in activity reports in the Azure Active Directory portal
    For Sign-in activity reports in the Azure Active Directory portal, please refer this link 
    For Azure Active Directory sign-in activity report API samples, please refer this link


    Wednesday, July 4, 2018 12:00 PM
  • Checking in to see if the above answer helped. Let me know if there are still any additional issues I can help with.



    Friday, July 6, 2018 9:46 AM