在哪里可以找到Azure API访问中列出的WebAPI的resourceIds?

时间:2019-02-18 20:45:52

标签: azure azure-active-directory

Graph API的

ResourceId为:https://graph.windows.net/

我在一些在线示例代码中发现了这一点,但是找不到其他API。在哪里可以找到其他API的resourceId,例如:Office 365管理API,Windows Azure Active Directory,Windows Azure服务管理API

2 个答案:

答案 0 :(得分:1)

好吧,您可能期望Microsoft Graph API为<!DOCTYPE html> <html> <head> <title>PC Request Form</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link href="https://fonts.googleapis.com/css?family=Questrial" rel="stylesheet"> <style type="text/css"> </style> </head> <body> <div id="login-content" style="margin-left: 40px; font-family: Questrial; position: relative;"> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <nav> <ul> <li id="login"> <a id="login-trigger" href="#" style="color: black;"> View Requests <span>▼</span> </a> <div id="login-content"> <form> <fieldset id="inputs"> <input id="username" type="hidden" name="username" placeholder="Username" value="admin" required> <input id="password" type="password" name="password" placeholder="Password" required> </fieldset> <fieldset id="actions"> <input type="hidden" name="submitted" id="submitted" value="yes"> <input type="submit" id="submit" name="submit" value="Log in"> </fieldset> </form> </div> </li> </ul> </nav> </form> </div> <br /><br /> <div class="container" style="margin-left: 1%; margin-top: -5%"> <img src="img/corelogo.png" width="250px; height: 110px;"></img> <h4>PC Request Form <button type="button" name="add" id="add" class="btn btn-success btn-xs">Add request</button></h4> <div class="table-responsive" style="width: 114%;"> <table class="table table-bordered" style="border-radius: 10px;" id="crud_table"> <tr> <th width="30%">Requested By</th> <th width="10%">Start Date</th> <th width="10%">Employee Name</th> <th width="10%">Position</th> <th width="10%">Account</th> <th width="10%">Platform</th> <th width="45%">Processor</th> <th width="10%">RAM</th> <th width="10%">Monitor</th> <th width="10%">Phone</th> <th width="10%">Phone Type</th> <th width="10%">Headset</th> </tr> <tr> <td contenteditable="true" class="reqname"></td> <td class="date"><input type="date"></td> <td contenteditable="true" class="empname"></td> <td class="position"> <select size="1"> <option>SpecOps</option> <option>Account Specialist</option> <option>Operations Manager</option> <option>Supervisor</option> <option>Admin</option> <option>I.T.</option> </select> </td> <td class="account"> <select size="1"> <option>Cintas - Hospitality</option> <option>Cintas - Rentals</option> <option>Cintas - Fire</option> <option>Cintas - GSC</option> <option>Metro Service</option> <option>Cintas - DeepClean</option> <option>Rogers</option> <option>Olibra</option> <option>American Towns</option> </select> </td> <td class="platform"> <select size="1"> <option>Desktop</option> <option>Laptop</option> </select> </td> <td class="processor"> <select size="1"> <option>i3</option> <option>i5</option> <option>i7</option> </select> </td> <td class="ram"> <select size="1"> <option>4GB</option> <option>8GB</option> </select> </td> <td class="monitor"> <select size="1"> <option>Single</option> <option>Dual</option> <option>Video Card</option> </select> </td> <td class="phone"> <select size="1"> <option>Hard Phone</option> <option>Soft Phone</option> </select> </td> <td class="phonetype"> <select size="1"> <option>Direct Number</option> <option>Extension</option> </select> </td> <td class="headset"> <select size="1"> <option>Hard Phone</option><option>Soft Phone</option> </select> </td> </tr> </table> <div align="right"> </div> <div align="center"> <button type="button" name="save" id="save" class="btn btn-info">Send</button> </div> <br /> <div id="inserted_item_data"></div> </div> </div> </body> </html> <script> $(document).ready(function(){ $('#login-trigger').click(function(){ $(this).next('#login-content').slideToggle(); $(this).toggleClass('active'); if ($(this).hasClass('active')) $(this).find('span').html('&#x25B2;') else $(this).find('span').html('&#x25BC;') }) }); </script> <script> $(document).ready(function(){ var count = 1; $('#add').click(function(){ count = count + 1; var html_code = "<tr id='row"+count+"'>"; html_code += "<td contenteditable='true' class='reqname'></td>"; html_code += "<td class='date'><input type='date'></td>"; html_code += "<td contenteditable='true' class='empname'></td>"; html_code += "<td class='position'><select><option>SpecOps</option><option>Account Specialist</option><option>Operations Manager</option><option>Supervisor</option><option>Admin</option><option>I.T.</option></select></td>"; html_code += "<td class='account'><select><option>Cintas - Hospitality</option><option>Cintas - Rentals</option><option>Cintas - Fire</option><option>Cintas - GSC</option><option>Metro Service</option><option>Cintas - DeepClean</option><option>Rogers</option><option>Olibra</option><option>American Towns</option></select></td>"; html_code += "<td class='platform'><select><option>Desktop</option><option>Laptop</option></select></td>"; html_code += "<td class='processor'><select><option>i3</option><option>i5</option><option>i7</option></select></td>"; html_code += "<td class='ram'><select><option>4GB</option><option>8GB</option></select></td>"; html_code += "<td class='monitor'><select><option>Single</option><option>Dual</option><option>Video Card</option></select></td>"; html_code += "<td class='phone'><select><option>Hard Phone</option><option>Soft Phone</option></select></td>"; html_code += "<td class='phonetype'><select><option>Direct Number</option><option>Extension</option></select></td>"; html_code += "<td class='headset'><select><option>Yes, Heavy Caller</option><option>No Need</option></select></td>"; html_code += "<td><button type='button' name='remove' data-row='row"+count+"' class='btn btn-danger btn-xs remove'>-</button></td>"; html_code += "</tr>"; $('#crud_table').append(html_code); }); $(document).on('click', '.remove', function(){ var delete_row = $(this).data("row"); $('#' + delete_row).remove(); }); $('#save').click(function(){ var reqname = []; var date = []; var empname = []; var position = []; var account = []; var platform = []; var processor = []; var ram = []; var monitor = []; var phone = []; var phonetype = []; var headset = []; $('.reqname').each(function(){ reqname.push($(this).text()); }); $('.date').each(function(){ date.push($(this).find('input').val()); }); $('.empname').each(function(){ empname.push($(this).text()); }); $('.position').each(function(){ position.push($(this).find('select').val()); }); $('.account').each(function(){ account.push($(this).find('select').val()); }); $('.platform').each(function(){ platform.push($(this).find('select').val()); }); $('.processor').each(function(){ processor.push($(this).find('select').val()); }); $('.ram').each(function(){ ram.push($(this).find('select').val()); }); $('.monitor').each(function(){ monitor.push($(this).find('select').val()); }); $('.phone').each(function(){ phone.push($(this).find('select').val()); }); $('.phonetype').each(function(){ phonetype.push($(this).find('select').val()); }); $('.headset').each(function(){ headset.push($(this).find('select').val()); }); $.ajax({ url:"insert-message.php", method:"POST", data:{reqname:reqname, date:date, empname:empname, position:position, account:account, platform:platform, processor:processor, ram:ram, monitor:monitor, phone:phone, phonetype:phonetype, headset:headset}, success:function(data){ alert(data); $("td[contentEditable='true']").text(""); for(var i=2; i<= count; i++) { $('tr#'+i+'').remove(); } fetch_item_data(); } }); }); }); </script>

您可以在这里找到一些一些Azure API:https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/services-support-msi#azure-services-that-support-azure-ad-authentication

如果您最终无法在任何地方找到它,则可以使用Graph Explorer https://aka.ms/ge通过/ beta / servicePrincipals获取租户中的所有服务主体。 查找API的主体,它将具有标识符URI。

答案 1 :(得分:0)

我的解决方案是找到API参考,并研究文档中的一些示例API。例如。对于Office 365 Management APIs,Google Office 365 Management APIs reference,我们可以找到thisthis之类的文档,因此ResourceId应该是https://manage.office.com

使用相同的方式,我们可以发现Windows Azure Active Directory(i.e. azure ad graph api)https://graph.windows.netWindows Azure Service Management APIhttps://management.core.windows.net