Error : Microsoft.Azure.ActiveDirectory.GraphClient.AuthorizationException Insufficient privileges to complete the operation
Solution:
Under Configure
under Permissions to other applications
Add application - Windows Azure Active Directory
Give the following permissions
Read directory data
Sign in and read user profile
Stack Trace :
Microsoft.Azure.ActiveDirectory.GraphClient.AuthorizationException was unhandled by user code
HResult=-2146233088
Message=Insufficient privileges to complete the operation.
Source=Microsoft.Azure.ActiveDirectory.GraphClient
Code=Authorization_RequestDenied
ErrorMessage=Insufficient privileges to complete the operation.
ResponseUri=https://graph.windows.net/
StackTrace:
at Microsoft.Azure.ActiveDirectory.GraphClient.ConnectionWrapper.InvokeNetworkOperation[T](Func`1 action)
at Microsoft.Azure.ActiveDirectory.GraphClient.ConnectionWrapper.DownloadData(String address, WebHeaderCollection additionalHeaders)
at Microsoft.Azure.ActiveDirectory.GraphClient.ConnectionWrapper.DownloadData(Uri address, WebHeaderCollection additionalHeaders)
at Microsoft.Azure.ActiveDirectory.GraphClient.GraphConnection.GetCore(Type objectType, String objectId, FilterGenerator filterGenerator, Uri& requestUri)
at Microsoft.Azure.ActiveDirectory.GraphClient.GraphConnection.Get(Type objectType, String objectId, LinkProperty expandProperty)
at Microsoft.Azure.ActiveDirectory.GraphClient.GraphConnection.Get(Type objectType, String objectId)
at Microsoft.Azure.ActiveDirectory.GraphClient.GraphConnection.Get[T](String objectId)
at Readify.Sudo.Web.Infrastructure.Identity.GraphClaimsAuthenticationManager.Authenticate(String resourceName, ClaimsPrincipal incomingPrincipal) in
at System.IdentityModel.Services.WSFederationAuthenticationModule.SignInWithResponseMessage(HttpRequestBase request)
at System.IdentityModel.Services.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args)
InnerException:
Comments