Get the user role from Azure AD by Laravel azure ad oauth

%3CLINGO-SUB%20id%3D%22lingo-sub-1181498%22%20slang%3D%22en-US%22%3EGet%20the%20user%20role%20from%20Azure%20AD%20by%20Laravel%20azure%20ad%20oauth%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1181498%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20get%20the%20role%20form%20Azure%20AD%20by%20using%20metrogistics%2Flaravel-azure-ad-oauth%20socialiate%20plugin.%3C%2FP%3E%3CP%3EI%20got%20the%20name%20and%20email%20and%20azure_id%20from%20the%20Azure.%20But%20I%20can't%20get%20the%20user%20role.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20callback%20url%20output%20below%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Euser%3A%20array%3A12%20%5B%3CBR%20%2F%3E%22%40odata.context%22%20%3D%26gt%3B%20%22%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2F%24metadata%23users%2F%24entity%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2F%24metadata%23users%2F%24entity%3C%2FA%3E%22%3CBR%20%2F%3E%22businessPhones%22%20%3D%26gt%3B%20%5B%5D%3CBR%20%2F%3E%22displayName%22%20%3D%26gt%3B%20%22Test4%22%3CBR%20%2F%3E%22givenName%22%20%3D%26gt%3B%20%22Test4%22%3CBR%20%2F%3E%22jobTitle%22%20%3D%26gt%3B%20null%3CBR%20%2F%3E%22mail%22%20%3D%26gt%3B%20null%3CBR%20%2F%3E%22mobilePhone%22%20%3D%26gt%3B%20null%3CBR%20%2F%3E%22officeLocation%22%20%3D%26gt%3B%20null%3CBR%20%2F%3E%22preferredLanguage%22%20%3D%26gt%3B%20null%3CBR%20%2F%3E%22surname%22%20%3D%26gt%3B%20null%3CBR%20%2F%3E%22userPrincipalName%22%20%3D%26gt%3B%20%22test4%40xyz.com%22%3CBR%20%2F%3E%22id%22%20%3D%26gt%3B%20%22xyz%22%3CBR%20%2F%3E%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20possible%20to%20get%20the%20role%20from%20Azure%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1181498%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%20Management%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Backup%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I am trying to get the role form Azure AD by using metrogistics/laravel-azure-ad-oauth socialiate plugin.

I got the name and email and azure_id from the Azure. But I can't get the user role.

 

My callback url output below  

 

user: array:12 [
"@odata.context" => "https://graph.microsoft.com/v1.0/$metadata#users/$entity"
"businessPhones" => []
"displayName" => "Test4"
"givenName" => "Test4"
"jobTitle" => null
"mail" => null
"mobilePhone" => null
"officeLocation" => null
"preferredLanguage" => null
"surname" => null
"userPrincipalName" => "test4@xyz.com"
"id" => "xyz"
]

 

It is possible to get the role from Azure

0 Replies