Asp.Net Core , Azure Graph API Using Delegated Permissions - How to get user information in Azure

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024
  • We can use #Delegated permissions# where asp.net core web application uses logged in user's permission to access the resources. In this video we have demonstrated accessing Microsoft #Azure Graph API# using Delegated Permissions in Asp.net core Web App. This can give you best information to implement integration of asp.net Core Web app with Graph API using #Delegated Permissions#
    Link for Azure Ad Authentication Video - • Asp.Net Core Web Appli...
    Link for Asp.Net Core with Azure Graph API without AD authentication - • Asp.Net Core Web App w...
    Link for Asp.net Core with Azure Graph API with Authentication and DI - • Get User Details in Az...

Комментарии • 39

  • @manojpant4262
    @manojpant4262 Год назад

    Thanks For the Video !!!!

  • @vimleshsharma3251
    @vimleshsharma3251 Год назад

    Thank you so much for this video

    • @azureteachnet
      @azureteachnet  Год назад

      Thanks. Please subscribe to the channel if you have not subscribed yet.

  • @GC-0569
    @GC-0569 2 года назад

    Tq sooo much sir, It's working.

    • @azureteachnet
      @azureteachnet  2 года назад

      Thank you for letting me know. My channel has unique content on Azure. Please subscribe and share it with your friends. Thanks.

  • @karishmasingh9949
    @karishmasingh9949 2 года назад

    Thanks you. This was very helpful

    • @azureteachnet
      @azureteachnet  2 года назад

      Please subscribe to AzureTeach. net for more tutorials on Azure and .Net. Thank you.

    • @shiningstar6028
      @shiningstar6028 Год назад

      How to get group id for the logged in user soo that can redirect to the view according to the user group ( its . Net core mvc application and using azure ad policy to access group)

  • @walkingdadjokes6099
    @walkingdadjokes6099 2 года назад

    awesome. thanks!

    • @azureteachnet
      @azureteachnet  2 года назад +1

      If you need a daemon version which does not need user sign in, the channel already has a video for that. refer - ruclips.net/video/Z2Lu-PzWYLU/видео.html

  • @nothingisreal6345
    @nothingisreal6345 Год назад +1

    Thank you for the great video. Meanwhile MS has change the siganture of the EnableTokenAcquisitionToCallDownstreamApi(...) extension method. It doesn't have an overload that accepts scopes anymore. Does anybody know how to pass the scopes?

    • @azureteachnet
      @azureteachnet  Год назад

      Thanks for the feedback. Will try to cover it in future videos. Please subscribe to the channel if you have not subscribed yet. Thanks.

    • @shiningstar6028
      @shiningstar6028 Год назад

      How to get group id for the logged in user soo that can redirect to the view according to the user group ( its . Net core mvc application and using azure ad policy to access group)

  • @shiningstar6028
    @shiningstar6028 Год назад

    How to get group id for the logged in user soo that can redirect to the view according to the user group ( its . Net core mvc application and using azure ad policy to access group)

    • @azureteachnet
      @azureteachnet  Год назад

      check this - ruclips.net/video/pcWdR0LcNaI/видео.html
      Please subscribe to the channel if you have not subscribed yet. Thanks.

  • @furkankurt5331
    @furkankurt5331 2 года назад

    Thanks for the video!
    What about if I wanted to save those four users as 'users' into a newly created user group that is given some policies to make them reach out to my web app? I mean, my clients are organizations like schools. If I send an invitation to the admin and he accepts, I can get all the user data and save them as users to authenticate and authorize themselves... Is this approach is correct?

    • @azureteachnet
      @azureteachnet  2 года назад

      are you using Multi Tenant Azure AD? If you want to add users to any group, we can create an Azure AD Group in active directory and add required permissions to the gorup, then we can assign the group to the users. When you get the user information, you will get the groups assigned to the user too. For that GRAPH API is not needed. In the Identity itself you can find Group claims.

    • @markcuello5
      @markcuello5 2 года назад

      I don`t think user groups, as policy, are correct.

    • @shiningstar6028
      @shiningstar6028 Год назад

      How to get group id for the logged in user soo that can redirect to the view according to the user group ( its . Net core mvc application and using azure ad policy to access group).

    • @shiningstar6028
      @shiningstar6028 Год назад

      @@markcuello5 How to get group id for the logged in user soo that can redirect to the view according to the user group ( its . Net core mvc application and using azure ad policy to access group)

  • @MrLrajesh
    @MrLrajesh Год назад

    Thank you for video!
    I want to get the status of user for example Available, Away, Busy etc. I used the Presence resource for getting this. When I executred the code its throwing the forbidden error. I gave all presense related permissions to my app. Still its not working.

    • @azureteachnet
      @azureteachnet  Год назад

      Check if you are able to call any basic call like getting basic profile. If that works, check the permissions. If you use delegated permissions, make sure that the user has the required permissions.

    • @azureteachnet
      @azureteachnet  Год назад

      Please subscribe to the channel, if you have not subscribed yet. Thanks

    • @rajeshlohakare6049
      @rajeshlohakare6049 Год назад

      @@azureteachnet Thank you for quick reply! I am able to get basic user details like display name, mob no, mail etc. For presence its throwing forbidden error. I gave both delegate and application permissions to my app api. still its not working.

  • @user-yc2ho5oh7b
    @user-yc2ho5oh7b 11 месяцев назад

    I need this same in java can anyone help me to achieve this.

  • @pvnvchaitanya8864
    @pvnvchaitanya8864 2 года назад

    I tried your method but i am getting (Unable to resolve service for type 'Microsoft.Identity.Web.ITokenAcquisition' while attempting to activate controller class) this exception can you help me from this

    • @azureteachnet
      @azureteachnet  2 года назад

      check the startup.cs and see if it has call to token acquisation...like services.EnableTokenAcquisitionToCallDownstreamApi

  • @manojpant4262
    @manojpant4262 Год назад

    How to refresh the access token before expiration in asp.net core.

  • @ibrahimmukaila6787
    @ibrahimmukaila6787 2 года назад

    Hello Thank you for this video. I implemented this and it works fine. However if I restart my application it is giving this error
    msalUiRequiredException: No account or login hint was passed to the AcquireTokenSilent call.
    It looks like it has to do with not finding the cached token. Is there anyway around this? Thank you

    • @azureteachnet
      @azureteachnet  2 года назад

      It should not give error. When I worked, I restarted my application multiple times and did not see the issue. Was it failing while calling Graph API or at the time of login itself.

    • @shiningstar6028
      @shiningstar6028 Год назад

      How to get group id for the logged in user soo that can redirect to the view according to the user group ( its . Net core mvc application and using azure ad policy to access group)

  • @mrityunjaymahato7203
    @mrityunjaymahato7203 9 месяцев назад

    can we make the App without secret value ?

    • @azureteachnet
      @azureteachnet  9 месяцев назад

      There are primarily 2 flows in Azure AD. Delegated and Client Credentials(there are more but primarily 2). For delegated flow user must login to the application to work and for client credentials secret is required.

  • @prabhakar9105
    @prabhakar9105 2 года назад

    After completing sso authentication getting error localhost:44337 / might be temporary down or it may have move permanently to new web address
    Please help me

    • @azureteachnet
      @azureteachnet  2 года назад

      Please check your local host address and also the sign in url that you have configured in App Registration. They must be same and should be in the form that is shown in the video.

    • @prabhakar9105
      @prabhakar9105 2 года назад

      @@azureteachnet I am already check everything as video some time getting 400 error ( bad request) after sso authentication on landing page .
      Please help me I am struggling last few days 🙏

    • @azureteachnet
      @azureteachnet  2 года назад

      @@prabhakar9105 Can you share screenshots of your startup.cs, appsettings.json, azure ad authentication in facebook.com/groups/203337538580278 group. This way I can give a quick solution. Without seeing the code it is hard to answer.

    • @prabhakar9105
      @prabhakar9105 2 года назад

      @@azureteachnet kindly accept my request Than I will share screen shot