Skip to main content

Azure Active Directory GraphClient AuthorizationException

Error : Microsoft.Azure.ActiveDirectory.GraphClient.AuthorizationException Insufficient privileges to complete the operation


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
  Message=Insufficient privileges to complete the operation.
  ErrorMessage=Insufficient privileges to complete the operation.
       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)


Popular posts from this blog

SharePoint 2013 workflow : The server was unable to process the request

Here, I received another SharePoint 2013 workflow error. This time the workflow was not able to send emails and the following error was being shown Retrying last request. Next attempt scheduled in less than one minute. Details of last request: HTTP Unauthorized to http://sitename/_vti_bin/client.svc/web/lists/getbyid(guid'guid') Correlation Id: id Instance Id: id Fortunately I came across this post which gave me the answer Solution 1: In InetMgr, go to advanced settings for Security Token Service Application Pool and change "Load User Profile" to true. Recycle application pool. Reason 2 and Solution 2 : There could be another reason for this error. The workflow authentication can fail if the user executing the workflow (this will be the user initiating the workflow) is given permission through active directory group and the co

OWA not working after security update

Office web apps for SharePoint 2013 not working after security updates / server patching. After installation of the following security patches, OWA stopped working there by causing issues with SharePoint 2013. Details of ULS logs are provided below. FarmStateReplicator.exe (0x0CD8) Office Web Apps Farm State Error when trying to connect to Farm State Manager service: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http:// /farmstatemanager/FarmStateManager.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal

BCS Error - Access denied by Business Data Connectivity

I recently came across this error while attempting to configure an external content type in SharePoint 2013. The error message showed Access denied by Business Data Connectivity. On verifying the ULS logs the found errors as given in the table beneath the post Found the following support article, but it did not like the problem that I was having at hand. Then I came across this comment on the link This happens because you have not set access on the BCS object that you created. Go into Central Administration and select your External Content Type or other object and select Set Permissions from the dropdown. Your authentication is working or you would not be able to save the object you created to the metadata store. You now need to tell the metadata store who has access to the objects you created in BCS.  It worked like a charm. Updating in my blog post so that