Microsoft Graph | Powershell Script from Scratch

Поділитися
Вставка

КОМЕНТАРІ • 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.

  • @c016smith52
    @c016smith52 3 роки тому +2

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

  • @kenannan6768
    @kenannan6768 3 роки тому +3

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

  • @sehamhammad8549
    @sehamhammad8549 3 роки тому +2

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

  • @550891
    @550891 2 роки тому +1

    very helpful as always ! thank you!

  • @anelatiro8685
    @anelatiro8685 3 роки тому +2

    Thank you so much, Excellent video!

  • @sergeserge478
    @sergeserge478 3 роки тому +3

    Great explanation, helpFull. Thanks.

  • @benjamenreddy9867
    @benjamenreddy9867 3 роки тому +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

  • @Venugopal-xu1ks
    @Venugopal-xu1ks 2 роки тому +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.

  • @DavidPEREZ-bt1ot
    @DavidPEREZ-bt1ot 2 роки тому +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 ?

  • @GanjiAnilkumar
    @GanjiAnilkumar 2 роки тому +1

    This was nice explanation. I like your presentation.

    • @ConceptsWork
      @ConceptsWork  2 роки тому

      Thanks for your kind acknowledgement.

  • @jeffrin4u
    @jeffrin4u 2 роки тому +1

    Thanks brother.

  • @AshishSingh-ed2lg
    @AshishSingh-ed2lg 2 роки тому +1

    Top class effort, thanks for sharing mare

  • @toddwasielewski4607
    @toddwasielewski4607 Рік тому

    Thanks!

  • @vkabcd
    @vkabcd 3 роки тому +2

    Excellent....

  • @aniketkamble6935
    @aniketkamble6935 Рік тому +1

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

  • @ruffinruffin989
    @ruffinruffin989 2 роки тому +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.

  • @saeedad
    @saeedad 3 роки тому +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.

  • @MrBPDude
    @MrBPDude 6 місяців тому

    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  3 місяці тому +1

      Great suggestion! we will creating one.

  • @oindrilabandyopadhyay9055
    @oindrilabandyopadhyay9055 3 місяці тому

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

    • @ConceptsWork
      @ConceptsWork  3 місяці тому

      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.

  • @saeedredrose
    @saeedredrose 2 роки тому +1

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

    • @ConceptsWork
      @ConceptsWork  2 роки тому +1

      In this script, I am using Client Credential flow.

    • @saeedredrose
      @saeedredrose 2 роки тому +1

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

  • @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 3 роки тому +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  3 роки тому +2

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

  • @tariqueanwar5042
    @tariqueanwar5042 3 роки тому +2

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

    • @ConceptsWork
      @ConceptsWork  3 роки тому +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 3 роки тому

      ​ @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  3 роки тому

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

    • @tariqueanwar5042
      @tariqueanwar5042 3 роки тому

      @@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 3 роки тому

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

  • @meherdillip
    @meherdillip 3 роки тому +1

    lease query teamsuseractivityreport

    • @ConceptsWork
      @ConceptsWork  3 роки тому

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

  • @YerMawsGoatBaws
    @YerMawsGoatBaws 4 місяці тому

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

    • @ConceptsWork
      @ConceptsWork  3 місяці тому

      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.