Error while Setting up Azure AD Oauth in order to license 365 users Issue Customer set up the application in Azure AD, followed link : https://docs.servicenow.com/csh?topicname=set-up-azure.html&version=latest<https://docs.servicenow.com/csh?topicname=set-up-azure.html&version=latest . ->Customer is able to generate OAuth token succesfully. ->Customer is facing issue when they use the sysid of the OAuth Entity Profile as an input to the Assign User License activity -> receiving the following error: "Fault description: User Not Authenticated. OAuth token has expired or has not been retrieved." STR :-------- ->Go to workflow Editor, open any workflow.->On the right hand side ->Open Custom->Azure AD ->Adding user Licence -v1->Execution->Test inputs(provide details as provided by the customer) ->Click on test, we can see the error message popup :"Fault description: User Not Authenticated. OAuth token has expired or has not been retrieved." Error seen in the logs : Exception executing ProviderRunner: com.glide.communications.ProcessingException: User Not Authenticated. OAuth token has expired or has not been retrieved.: com.glide.rest.outbound.RESTMessageClient.invoke(RESTMessageClient.java:110)com.glide.rest.outbound.RESTMessageClient.execute(RESTMessageClient.java:78)ReleaseNACauseFound out that the Azure REST Messages in ServiceNow are using outdated endpoints and HTTP methods.ResolutionChanged the endpoints and HTTP methods from ‘https://graph.windows.net/myorganization/users’ to ‘https://graph.microsoft.com/v1.0/users/’ and the REST method ran successfully and returned no errors.Related LinksBelow are the complete errors seen in logs : Error seen in the logs : ------------------------------ Exception executing ProviderRunner: com.glide.communications.ProcessingException: User Not Authenticated. OAuth token has expired or has not been retrieved.: com.glide.rest.outbound.RESTMessageClient.invoke(RESTMessageClient.java:110)com.glide.rest.outbound.RESTMessageClient.execute(RESTMessageClient.java:78)com.snc.runbook_automation.element.providers.RestMessageJavaGateway.executeAndGetHTTPResponse(RestMessageJavaGateway.java:146)com.snc.runbook_automation.element.providers.RestMessageProvider.doTask(RestMessageProvider.java:145)com.snc.runbook_automation.element.providers.WebServiceProvider$1.doEvent(WebServiceProvider.java:235)com.snc.runbook_automation.element.providers.OrchestrationActivityProvider.executeWithoutWorkflow(OrchestrationActivityProvider.java:112)com.snc.runbook_automation.element.providers.OrchestrationActivityProvider.executeJSON(OrchestrationActivityProvider.java:680)com.snc.runbook_automation.element.providers.ProviderRunner.executeWithoutWorkflow(ProviderRunner.java:27)com.snc.runbook_automation.element.providers.ProviderRunner.jsStaticFunction_execute(ProviderRunner.java:48)sun.reflect.GeneratedMethodAccessor1158.invoke(Unknown Source)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:498)org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:670)org.mozilla.javascript.FunctionObject.call(FunctionObject.java:614)org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2582)org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)org.mozilla.javascript.gen.sys_script_include_3f652a7293033100c08195cf867ffb44_script_2211._c_anonymous_1(sys_script_include.3f652a7293033100c08195cf867ffb44.script:16)org.mozilla.javascript.gen.sys_script_include_3f652a7293033100c08195cf867ffb44_script_2211.call(sys_script_include.3f652a7293033100c08195cf867ffb44.script)org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651)org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590)org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2549)org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:102)org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2588)org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)org.mozilla.javascript.gen.sys_script_include_d65f78c40a0a0b6900196656f35913d3_script_521._c_anonymous_2(sys_script_include.d65f78c40a0a0b6900196656f35913d3.script:34)org.mozilla.javascript.gen.sys_script_include_d65f78c40a0a0b6900196656f35913d3_script_521.call(sys_script_include.d65f78c40a0a0b6900196656f35913d3.script)org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:563)org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3429)org.mozilla.javascript.gen.sys_script_include_d65f78c40a0a0b6900196656f35913d3_script_521.call(sys_script_include.d65f78c40a0a0b6900196656f35913d3.script)org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2651)org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590)org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:2655)org.mozilla.javascript.ScriptableObject.callMethod(ScriptableObject.java:2627)com.glide.script.RhinoObject.callFunction(RhinoObject.java:169)com.glide.script.RhinoObject.callFunction(RhinoObject.java:165)com.glide.processors.xmlhttp.AJAXEvaluator.evalScriptInclude(AJAXEvaluator.java:169)com.glide.processors.xmlhttp.AJAXEvaluator.evaluateAjax(AJAXEvaluator.java:85)com.glide.processors.xmlhttp.AJAXEvaluator.process(AJAXEvaluator.java:63)com.glide.processors.XMLHttpProcessor.processJavaAJAX(XMLHttpProcessor.java:169)com.glide.processors.XMLHttpProcessor.process(XMLHttpProcessor.java:121)com.glide.processors.AProcessor.runProcessor(AProcessor.java:553)com.glide.processors.AProcessor.processTransaction(AProcessor.java:240)com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:177)com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:166)com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:31)com.glide.sys.Transaction.run(Transaction.java:2203)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)java.lang.Thread.run(Thread.java:748)