Microsoft Graph | Powershell Script from Scratch

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

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

  • @yongzhang10
    @yongzhang10 2 года назад +2

    Decided to join the channel after viewing some awesome videos. Best of all Azure training materials I have come across. Thank you Concepts Work

  • @nikhil9860
    @nikhil9860 2 года назад +3

    Great video and explanation, No educator can match your explanation style its so easy to understand.

  • @sehamhammad8549
    @sehamhammad8549 3 года назад +2

    Excellent video and great explanation, thanks very much, you saved my day... Keep the good work up

  • @c016smith52
    @c016smith52 4 года назад +2

    Excellent video, very thorough and covers all the bases. Thanks very much!

  • @Venugopal-xu1ks
    @Venugopal-xu1ks 3 года назад +2

    Your videos explain the topic in detail. Thank you. I request you to prepare video for Microsoft Graph to Intune database and to create custom reports.

  • @kenannan6768
    @kenannan6768 3 года назад +3

    This was great and helped me solve an issue I was having.

  • @benjamenreddy9867
    @benjamenreddy9867 4 года назад +4

    I tried the same step and it failed for /v2.0/ but works fine when I use the Uri from your code, any change in body parameter for v2.0. Kind regards

  • @sergeserge478
    @sergeserge478 3 года назад +3

    Great explanation, helpFull. Thanks.

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

    Thanks!

  • @ruffinruffin989
    @ruffinruffin989 3 года назад +1

    I keep getting the following error.
    Error Code 7000216
    Message 'client_assertion', 'client_secret' or 'request' is required for the 'client_credentials' grant type.
    Remediation Developer error - the app is attempting to sign in without the necessary or correct authentication parameters.

  • @anelatiro8685
    @anelatiro8685 3 года назад +2

    Thank you so much, Excellent video!

  • @GanjiAnilkumar
    @GanjiAnilkumar 3 года назад +1

    This was nice explanation. I like your presentation.

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

      Thanks for your kind acknowledgement.

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

    It only fetch first 999 accounts and how we can get extension attribute or expanded properties

  • @DavidPEREZ-bt1ot
    @DavidPEREZ-bt1ot 3 года назад +1

    Hello ! Great works !! Thanks a lot.
    Just one question I still have "The remote server returned an error : (410) Unauthorized" while i've granted User.Read.all permissions... Any idea ?

  • @AshishSingh-ed2lg
    @AshishSingh-ed2lg 3 года назад +1

    Top class effort, thanks for sharing mare

  • @saeedredrose
    @saeedredrose 3 года назад +1

    Why you did not use OAuth 2.0 authorization endpoint (v1) for getting the authorization code ?

    • @ConceptsWork
      @ConceptsWork  3 года назад +1

      In this script, I am using Client Credential flow.

    • @saeedredrose
      @saeedredrose 3 года назад +1

      @@ConceptsWork correct , when i watched the client flow (service principal) got my answer . Thanks for your great video

  • @MrBPDude
    @MrBPDude 10 месяцев назад

    Thanks. Most examples are always with apps that have a secret defined. Would like to see some examples with delegated permissions. Letting user perform an auth first. Do you have video on this scnario?

    • @ConceptsWork
      @ConceptsWork  7 месяцев назад +1

      Great suggestion! we will creating one.

  • @550891
    @550891 3 года назад +1

    very helpful as always ! thank you!

  • @itsdd9873
    @itsdd9873 4 года назад +2

    Invoke-RestMethod : {"error":"invalid_request","error_description":"AADSTS901002: The 'resource' request parameter is not supported.
    Trace ID:
    i am getting above error, don't know what is wrong, can you help ?

    • @ConceptsWork
      @ConceptsWork  4 года назад

      This error comes, when you try to access a resource with invalid value. Can you please share the exact link which you are trying to access.
      This is something which I will be covering this weekend, where I will be discussing the exact metadata model for graph.

    • @itsdd9873
      @itsdd9873 4 года назад

      @@ConceptsWork resource = "graph.microsoft.com/" this what i added in resource.

    • @ConceptsWork
      @ConceptsWork  4 года назад

      Remove last forward slash.
      Instead of graph.microsoft.com/ use graph.microsoft.com

    • @peterlinders3500
      @peterlinders3500 4 года назад +3

      Please change the following in the $Body section --> 'resource = "graph.microsoft.com/"' into 'scope = "graph.microsoft.com/.default" ' !
      This modification works for me.

    • @ConceptsWork
      @ConceptsWork  4 года назад +2

      Just FYI .... scope is the parameter that has to be used with V2.0 endpoints

  • @oindrilabandyopadhyay9055
    @oindrilabandyopadhyay9055 8 месяцев назад

    One question- why are you not passing the scope/permission within the $Body of the powershell script ?

    • @ConceptsWork
      @ConceptsWork  7 месяцев назад

      This video is created while using older endpoints, where the scope was not required.

  • @sam4jones1
    @sam4jones1 3 года назад +1

    Thanks for the tutorial. I am getting below error:
    The remote server returned an error : (410) Unauthorized
    When invoking the final call to graph.any help?

    • @ConceptsWork
      @ConceptsWork  3 года назад

      Please check, if the permissions are granted for the application to access the respective API.

  • @tariqueanwar5042
    @tariqueanwar5042 4 года назад +2

    How to get the photos for all of the users from Azure ad using this process

    • @ConceptsWork
      @ConceptsWork  4 года назад +1

      Hello Tarique, there are two ways to achieve this either with signed in session of the user using "me" endpoints or the user endpoint itself, please check this link - docs.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0#get-the-photo

    • @tariqueanwar5042
      @tariqueanwar5042 4 года назад

      ​ @Concepts Work I am using the beow end point ,when i am passing the $object id in the end point it is giving me syntax error .COuld you please make it correct:
      $url = "graph.microsoft.com/v1.0/users($objectid)/photo/$value".
      If the above works then how we are going to fetch the photos ?

    • @ConceptsWork
      @ConceptsWork  4 года назад

      The url should be users/$objectId, also let me know your endgoal.

    • @tariqueanwar5042
      @tariqueanwar5042 4 года назад

      @@ConceptsWork will try this.End goal is like I am trying to fetch the photos for all of the users present in Azure ad .

    • @tariqueanwar5042
      @tariqueanwar5042 4 года назад

      @@ConceptsWork i tried this but it is giving error:
      function getPhoto($objectid)
      {
      $url = "graph.microsoft.com/v1.0/users/$objectid/photo/$value"
      $query = Invoke-RestMethod -Method Get -Headers @{
      Authorization = "Bearer $($Tokenresponse.access_token)"
      'Content-Type' = "application/json"
      } -Uri $url

  • @benedaldo
    @benedaldo 3 года назад +1

    I'm getting following error:
    Invoke-RestMethod : {"error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.
    Script, client_id etc should be ok. Can anyone help please?

    • @benedaldo
      @benedaldo 3 года назад

      @
      Concepts Work: great video anyway ;) thanks for sharing!

    • @ConceptsWork
      @ConceptsWork  3 года назад +1

      This could be because of client secret mentioned is incorrect.

    • @benedaldo
      @benedaldo 3 года назад

      @@ConceptsWork Client Secret should be correct. Recreated it also but same error again.
      Ok, i found the error. You were correct, i did not copy the client secret but the id from the secrets... now it works :) thanks

    • @durgairaja4910
      @durgairaja4910 3 года назад

      @@ConceptsWork i'm also getting "error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.,but checked two times ..any suggestion

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

      @@durgairaja4910 u have to select secret value ... i got the same error due to i choose secret id. secret value can be copied when you create new once you moved from the page you will not able to copy that.

  • @vkabcd
    @vkabcd 3 года назад +2

    Excellent....

  • @saeedad
    @saeedad 4 года назад +1

    Hi again excellent video, I need to learn how to use next link loop in powershell to fetch all values in tenant? Would it be something I can learn once I join the channel?
    thanks

    • @JeremyTBradshaw
      @JeremyTBradshaw 3 года назад

      Take a look at MSGraphPSEssentials (PS module) on my GitHub. Specifically the New-MSGraphRequest function. It shows how I handle nextLink's in several available ways.

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

    Thanks brother.

  • @meherdillip
    @meherdillip 4 года назад +1

    lease query teamsuseractivityreport

    • @ConceptsWork
      @ConceptsWork  4 года назад

      Can you please share some more insights, as in what is your end goal.

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

    Hard-coding a client id and secret in a script?! I see that Security is not your priority here.

    • @ConceptsWork
      @ConceptsWork  7 месяцев назад

      This video is just to explain how to access data, for sure while developing solutions everyone has to follow security principles. Thank you for pointing out. Much Appreciated.