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

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ต.ค. 2024

ความคิดเห็น • 39

  • @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)

  • @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.

  • @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)

  • @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.

  • @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 - th-cam.com/video/pcWdR0LcNaI/w-d-xo.html
      Please subscribe to the channel if you have not subscribed yet. Thanks.

  • @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

  • @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.

  • @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)

  • @walkingdadjokes6099
    @walkingdadjokes6099 3 ปีที่แล้ว

    awesome. thanks!

    • @azureteachnet
      @azureteachnet  3 ปีที่แล้ว +1

      If you need a daemon version which does not need user sign in, the channel already has a video for that. refer - th-cam.com/video/Z2Lu-PzWYLU/w-d-xo.html

  • @karishmasingh9949
    @karishmasingh9949 3 ปีที่แล้ว

    Thanks you. This was very helpful

    • @azureteachnet
      @azureteachnet  3 ปีที่แล้ว

      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)

  • @mrityunjaymahato7203
    @mrityunjaymahato7203 11 หลายเดือนก่อน

    can we make the App without secret value ?

    • @azureteachnet
      @azureteachnet  11 หลายเดือนก่อน

      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

  • @manojpant4262
    @manojpant4262 ปีที่แล้ว

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

    • @azureteachnet
      @azureteachnet  ปีที่แล้ว

      will post a video in future. Thanks

  • @thahermohammed-s2g
    @thahermohammed-s2g ปีที่แล้ว

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