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.
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.
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 ?
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?
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 ?
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.
Please change the following in the $Body section --> 'resource = "graph.microsoft.com/"' into 'scope = "graph.microsoft.com/.default" ' ! This modification works for me.
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?
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
@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 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
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?
@@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
@@ConceptsWork i'm also getting "error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.,but checked two times ..any suggestion
@@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.
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
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.
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.
Decided to join the channel after viewing some awesome videos. Best of all Azure training materials I have come across. Thank you Concepts Work
Great video and explanation, No educator can match your explanation style its so easy to understand.
Excellent video and great explanation, thanks very much, you saved my day... Keep the good work up
Excellent video, very thorough and covers all the bases. Thanks very much!
Glad you enjoyed it!
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.
Noted
This was great and helped me solve an issue I was having.
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
Great explanation, helpFull. Thanks.
Glad it was helpful!
Thanks!
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.
Thank you so much, Excellent video!
Glad it was helpful!
This was nice explanation. I like your presentation.
Thanks for your kind acknowledgement.
It only fetch first 999 accounts and how we can get extension attribute or expanded properties
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 ?
Top class effort, thanks for sharing mare
Glad you enjoyed it
Why you did not use OAuth 2.0 authorization endpoint (v1) for getting the authorization code ?
In this script, I am using Client Credential flow.
@@ConceptsWork correct , when i watched the client flow (service principal) got my answer . Thanks for your great video
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?
Great suggestion! we will creating one.
very helpful as always ! thank you!
Glad it was helpful!
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 ?
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.
@@ConceptsWork resource = "graph.microsoft.com/" this what i added in resource.
Remove last forward slash.
Instead of graph.microsoft.com/ use graph.microsoft.com
Please change the following in the $Body section --> 'resource = "graph.microsoft.com/"' into 'scope = "graph.microsoft.com/.default" ' !
This modification works for me.
Just FYI .... scope is the parameter that has to be used with V2.0 endpoints
One question- why are you not passing the scope/permission within the $Body of the powershell script ?
This video is created while using older endpoints, where the scope was not required.
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?
Please check, if the permissions are granted for the application to access the respective API.
How to get the photos for all of the users from Azure ad using this process
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
@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 ?
The url should be users/$objectId, also let me know your endgoal.
@@ConceptsWork will try this.End goal is like I am trying to fetch the photos for all of the users present in Azure ad .
@@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
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?
@
Concepts Work: great video anyway ;) thanks for sharing!
This could be because of client secret mentioned is incorrect.
@@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
@@ConceptsWork i'm also getting "error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret is provided.,but checked two times ..any suggestion
@@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.
Excellent....
Thanks a lot
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
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.
Thanks brother.
lease query teamsuseractivityreport
Can you please share some more insights, as in what is your end goal.
Hard-coding a client id and secret in a script?! I see that Security is not your priority here.
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.