Bearer Token w/ C# REST API

Julio Caproni 31 Reputation points

Hi guys,

I am quite confusing/lost with somethings that I was requested to do. It is basically, Bearer Token authentication with my users stored on Azure Storage Account, I spent basically two days looking how can I do that, but I could find nothing on internet, I'm beginner into this coding life, I might have misunderstood some explanations, whenever I click to read there are some many pages of everything that, its quite hard to get it.

I'm looking for some kind of guiding through this, because I don't know from where I should start.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,826 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
4,291 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,497 questions
{count} votes

2 answers

Sort by: Most helpful
  1. CowieCowie 76 Reputation points

    Hi 95289493, its suggested to use SAS authentication rather than bearer token to get to Azure Storage Account. Therere huge amounts of official tutorials about it.
    You can find how you build a sample and get blob or something else from your Azure Storage Account (with REST API) from the link below:
    Link1. storage-rest-api-auth

    I also found something that might be helpful for you.

    Link2. C# REST API tutorials: console-webapiclient
    Link3. Authentication and Bearer token tutorials: authentication-and-authorization

    If you are still confused about your problem, please comment here and we can discuss more about it. If my answer were useful, please accept it and kindly up vote it!
    Dont be afraid of coding, its normal to feel confused from time to time at the beginning of coding. Happy coding!

  2. SaiKishor-MSFT 17,216 Reputation points

    @Julio Caproni Thank you for reaching out to Microsoft Q&A. I understand that you want to know how you can achieve Bearer Token that can be used for authentication.

    Here are some articles which talk about getting the Bearer Token-

    As seen, if you use POSTMAN, it has the script already to get this token once you populate the Tennant ID, Client ID and Client secret. Here is how to get these three values by creating a service principal-, which will result in an output which includes all these values as shown below-


    Where, AppID- Client ID
    Password- Client password
    Tenant- Tenant ID

    Hope this helps. Please let us know if you have any further questions/concerns and I will be glad to assist further. Thank you!

    0 comments No comments