<?xml version="1.0" encoding="us-ascii"?>
<!-- DFIN ActiveDisclosure(SM) XBRL Linkbase Document - http://www.dfinsolutions.com/ -->
<!-- Creation Date      : 2021-01-26T04:09:49.1618364+00:00 -->
<!-- Version            : 5.0.1.571 -->
<!-- Package ID         : b78cba74721d4600a9a62347a2308150 -->
<!-- Copyright (c) 2021 Donnelley Financial Solutions, Inc. All Rights Reserved. -->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" arcroleURI="http://xbrl.org/int/dim/arcrole/all" />
  <link:arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" />
  <link:arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" />
  <link:arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" />
  <link:arcroleRef xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" />
  <link:roleRef xlink:type="simple" xlink:href="msft-20201231.xsd#TemplateLink" roleURI="http://www.microsoft.com/20201231/role/TemplateLink" />
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DocumentDocumentAndEntityInformation" xlink:href="msft-20201231.xsd#Role_DocumentDocumentAndEntityInformation" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DocumentDocumentAndEntityInformation">
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityListingParValuePerShare" xlink:type="locator" xlink:label="dei_EntityListingParValuePerShare" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityCommonStockSharesOutstanding" xlink:type="locator" xlink:label="dei_EntityCommonStockSharesOutstanding" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentTransitionReport" xlink:type="locator" xlink:label="dei_DocumentTransitionReport" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentQuarterlyReport" xlink:type="locator" xlink:label="dei_DocumentQuarterlyReport" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_LocalPhoneNumber" xlink:type="locator" xlink:label="dei_LocalPhoneNumber" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_CityAreaCode" xlink:type="locator" xlink:label="dei_CityAreaCode" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressPostalZipCode" xlink:type="locator" xlink:label="dei_EntityAddressPostalZipCode" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressStateOrProvince" xlink:type="locator" xlink:label="dei_EntityAddressStateOrProvince" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressCityOrTown" xlink:type="locator" xlink:label="dei_EntityAddressCityOrTown" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityAddressAddressLine1" xlink:type="locator" xlink:label="dei_EntityAddressAddressLine1" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityTaxIdentificationNumber" xlink:type="locator" xlink:label="dei_EntityTaxIdentificationNumber" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityIncorporationStateCountryCode" xlink:type="locator" xlink:label="dei_EntityIncorporationStateCountryCode" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityFileNumber" xlink:type="locator" xlink:label="dei_EntityFileNumber" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_SecurityExchangeName" xlink:type="locator" xlink:label="dei_SecurityExchangeName" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_Security12bTitle" xlink:type="locator" xlink:label="dei_Security12bTitle" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityShellCompany" xlink:type="locator" xlink:label="dei_EntityShellCompany" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityEmergingGrowthCompany" xlink:type="locator" xlink:label="dei_EntityEmergingGrowthCompany" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntitySmallBusiness" xlink:type="locator" xlink:label="dei_EntitySmallBusiness" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityFilerCategory" xlink:type="locator" xlink:label="dei_EntityFilerCategory" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityInteractiveDataCurrent" xlink:type="locator" xlink:label="dei_EntityInteractiveDataCurrent" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityCurrentReportingStatus" xlink:type="locator" xlink:label="dei_EntityCurrentReportingStatus" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_CurrentFiscalYearEndDate" xlink:type="locator" xlink:label="dei_CurrentFiscalYearEndDate" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityCentralIndexKey" xlink:type="locator" xlink:label="dei_EntityCentralIndexKey" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityRegistrantName" xlink:type="locator" xlink:label="dei_EntityRegistrantName" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_TradingSymbol" xlink:type="locator" xlink:label="dei_TradingSymbol" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentFiscalPeriodFocus" xlink:type="locator" xlink:label="dei_DocumentFiscalPeriodFocus" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentFiscalYearFocus" xlink:type="locator" xlink:label="dei_DocumentFiscalYearFocus" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentPeriodEndDate" xlink:type="locator" xlink:label="dei_DocumentPeriodEndDate" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_AmendmentFlag" xlink:type="locator" xlink:label="dei_AmendmentFlag" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_DocumentType" xlink:type="locator" xlink:label="dei_DocumentType" />
    <link:loc xlink:href="msft-20201231.xsd#msft_NotesTwoPointSixTwoFivePercentDueMayTwoTwentyThirtyThreeMember" xlink:type="locator" xlink:label="msft_NotesTwoPointSixTwoFivePercentDueMayTwoTwentyThirtyThreeMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_NotesThreePointOneTwoFivePercentDueDecemberSixTwentyTwentyEightMember" xlink:type="locator" xlink:label="msft_NotesThreePointOneTwoFivePercentDueDecemberSixTwentyTwentyEightMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_NotesTwoPointOneTwoFivePercentDueDecemberSixTwentyTwentyOneMember" xlink:type="locator" xlink:label="msft_NotesTwoPointOneTwoFivePercentDueDecemberSixTwentyTwentyOneMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CommonStockMember" xlink:type="locator" xlink:label="us-gaap_CommonStockMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:type="locator" xlink:label="us-gaap_ClassOfStockDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:type="locator" xlink:label="us-gaap_ClassOfStockDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:type="locator" xlink:label="us-gaap_StatementClassOfStockAxis" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntitiesTable" xlink:type="locator" xlink:label="dei_EntitiesTable" />
    <link:loc xlink:href="https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd#dei_EntityInformationLineItems" xlink:type="locator" xlink:label="dei_EntityInformationLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntitiesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="dei_EntitiesTable" xlink:to="us-gaap_StatementClassOfStockAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementClassOfStockAxis" xlink:to="us-gaap_ClassOfStockDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementClassOfStockAxis" xlink:to="us-gaap_ClassOfStockDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockDomain" xlink:to="us-gaap_CommonStockMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockDomain" xlink:to="msft_NotesTwoPointOneTwoFivePercentDueDecemberSixTwentyTwentyOneMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockDomain" xlink:to="msft_NotesThreePointOneTwoFivePercentDueDecemberSixTwentyTwentyEightMember" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ClassOfStockDomain" xlink:to="msft_NotesTwoPointSixTwoFivePercentDueMayTwoTwentyThirtyThreeMember" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_DocumentType" order="10340.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_AmendmentFlag" order="10360.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_DocumentPeriodEndDate" order="10380.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_DocumentFiscalYearFocus" order="10400.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_DocumentFiscalPeriodFocus" order="10420.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_TradingSymbol" order="10440.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityRegistrantName" order="10460.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityCentralIndexKey" order="10480.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_CurrentFiscalYearEndDate" order="10500.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityCurrentReportingStatus" order="10520.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityInteractiveDataCurrent" order="10540.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityFilerCategory" order="10560.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntitySmallBusiness" order="10580.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityEmergingGrowthCompany" order="10600.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityShellCompany" order="10620.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_Security12bTitle" order="10640.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_SecurityExchangeName" order="10660.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityFileNumber" order="10680.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityIncorporationStateCountryCode" order="10700.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityTaxIdentificationNumber" order="10720.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityAddressAddressLine1" order="10740.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityAddressCityOrTown" order="10760.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityAddressStateOrProvince" order="10780.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityAddressPostalZipCode" order="10800.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_CityAreaCode" order="10820.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_LocalPhoneNumber" order="10840.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_DocumentQuarterlyReport" order="10860.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_DocumentTransitionReport" order="10880.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityCommonStockSharesOutstanding" order="10900.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="dei_EntityInformationLineItems" xlink:to="dei_EntityListingParValuePerShare" order="10920.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/StatementINCOMESTATEMENTS" xlink:href="msft-20201231.xsd#Role_StatementINCOMESTATEMENTS" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/StatementINCOMESTATEMENTS">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract" xlink:type="locator" xlink:label="us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EarningsPerShareDiluted" xlink:type="locator" xlink:label="us-gaap_EarningsPerShareDiluted" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EarningsPerShareBasic" xlink:type="locator" xlink:label="us-gaap_EarningsPerShareBasic" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EarningsPerShareAbstract" xlink:type="locator" xlink:label="us-gaap_EarningsPerShareAbstract" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetIncomeLoss" xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:type="locator" xlink:label="us-gaap_IncomeTaxExpenseBenefit" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" xlink:type="locator" xlink:label="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NonoperatingIncomeExpense" xlink:type="locator" xlink:label="us-gaap_NonoperatingIncomeExpense" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:type="locator" xlink:label="us-gaap_OperatingIncomeLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GeneralAndAdministrativeExpense" xlink:type="locator" xlink:label="us-gaap_GeneralAndAdministrativeExpense" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SellingAndMarketingExpense" xlink:type="locator" xlink:label="us-gaap_SellingAndMarketingExpense" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ResearchAndDevelopmentExpense" xlink:type="locator" xlink:label="us-gaap_ResearchAndDevelopmentExpense" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GrossProfit" xlink:type="locator" xlink:label="us-gaap_GrossProfit" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CostOfGoodsAndServicesSold" xlink:type="locator" xlink:label="us-gaap_CostOfGoodsAndServicesSold" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ServiceOtherMember" xlink:type="locator" xlink:label="us-gaap_ServiceOtherMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ProductMember" xlink:type="locator" xlink:label="us-gaap_ProductMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ProductsAndServicesDomain" xlink:type="locator" xlink:label="srt_ProductsAndServicesDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ProductsAndServicesDomain" xlink:type="locator" xlink:label="srt_ProductsAndServicesDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ProductOrServiceAxis" xlink:type="locator" xlink:label="srt_ProductOrServiceAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable" xlink:type="locator" xlink:label="us-gaap_StatementTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems" xlink:type="locator" xlink:label="us-gaap_StatementLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="10110.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="srt_ProductOrServiceAxis" order="10140.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain_2" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="us-gaap_ProductMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="us-gaap_ServiceOtherMember" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" order="10280.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CostOfGoodsAndServicesSold" order="10520.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_GrossProfit" order="10760.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ResearchAndDevelopmentExpense" order="10840.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_SellingAndMarketingExpense" order="10920.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_GeneralAndAdministrativeExpense" order="11000.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OperatingIncomeLoss" order="11080.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_NonoperatingIncomeExpense" order="11160.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments" order="11240.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_IncomeTaxExpenseBenefit" order="11320.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_NetIncomeLoss" order="11400.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_EarningsPerShareAbstract" order="11480.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EarningsPerShareAbstract" xlink:to="us-gaap_EarningsPerShareBasic" order="11640.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EarningsPerShareAbstract" xlink:to="us-gaap_EarningsPerShareDiluted" order="11720.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract" order="11800.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract" xlink:to="us-gaap_WeightedAverageNumberOfSharesOutstandingBasic" order="11960.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_WeightedAverageNumberOfSharesOutstandingAbstract" xlink:to="us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding" order="12040.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/StatementSTOCKHOLDERSEQUITYSTATEMENTS" xlink:href="msft-20201231.xsd#Role_StatementSTOCKHOLDERSEQUITYSTATEMENTS" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/StatementSTOCKHOLDERSEQUITYSTATEMENTS">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CommonStockDividendsPerShareDeclared" xlink:type="locator" xlink:label="us-gaap_CommonStockDividendsPerShareDeclared" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockholdersEquityOther" xlink:type="locator" xlink:label="us-gaap_StockholdersEquityOther" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:type="locator" xlink:label="us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockRepurchasedDuringPeriodValue" xlink:type="locator" xlink:label="us-gaap_StockRepurchasedDuringPeriodValue" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DividendsCommonStockCash" xlink:type="locator" xlink:label="us-gaap_DividendsCommonStockCash" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetIncomeLoss" xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueNewIssues" xlink:type="locator" xlink:label="us-gaap_StockIssuedDuringPeriodValueNewIssues" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccountingStandardsUpdateExtensibleList" xlink:type="locator" xlink:label="us-gaap_AccountingStandardsUpdateExtensibleList" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockholdersEquity" xlink:type="locator" xlink:label="us-gaap_StockholdersEquity" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember" xlink:type="locator" xlink:label="srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_CumulativeEffectPeriodOfAdoptionDomain" xlink:type="locator" xlink:label="srt_CumulativeEffectPeriodOfAdoptionDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_CumulativeEffectPeriodOfAdoptionDomain" xlink:type="locator" xlink:label="srt_CumulativeEffectPeriodOfAdoptionDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_CumulativeEffectPeriodOfAdoptionAxis" xlink:type="locator" xlink:label="srt_CumulativeEffectPeriodOfAdoptionAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:type="locator" xlink:label="us-gaap_RetainedEarningsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember" xlink:type="locator" xlink:label="us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain" xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain" xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:type="locator" xlink:label="us-gaap_StatementEquityComponentsAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable" xlink:type="locator" xlink:label="us-gaap_StatementTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems" xlink:type="locator" xlink:label="us-gaap_StatementLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_StatementEquityComponentsAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_CommonStockIncludingAdditionalPaidInCapitalMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_RetainedEarningsMember" order="10290.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeMember" order="10430.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="srt_CumulativeEffectPeriodOfAdoptionAxis" order="10680.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_CumulativeEffectPeriodOfAdoptionAxis" xlink:to="srt_CumulativeEffectPeriodOfAdoptionDomain_2" order="10690.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_CumulativeEffectPeriodOfAdoptionAxis" xlink:to="srt_CumulativeEffectPeriodOfAdoptionDomain" order="10710.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CumulativeEffectPeriodOfAdoptionDomain" xlink:to="srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember" order="10730.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquity" order="10800.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AccountingStandardsUpdateExtensibleList" order="10880.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockIssuedDuringPeriodValueNewIssues" order="10960.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_NetIncomeLoss" order="11040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" order="11120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_DividendsCommonStockCash" order="11200.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockRepurchasedDuringPeriodValue" order="11280.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" order="11360.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StockholdersEquityOther" order="11440.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_CommonStockDividendsPerShareDeclared" order="13520.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureOTHERINCOMEEXPENSENETTables" xlink:href="msft-20201231.xsd#Role_DisclosureOTHERINCOMEEXPENSENETTables" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureOTHERINCOMEEXPENSENETTables">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GainLossOnInvestmentsTextBlock" xlink:type="locator" xlink:label="us-gaap_GainLossOnInvestmentsTextBlock" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RealizedGainLossOnInvestmentsTableTextBlock" xlink:type="locator" xlink:label="us-gaap_RealizedGainLossOnInvestmentsTableTextBlock" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfOtherNonoperatingIncomeExpenseTableTextBlock" xlink:type="locator" xlink:label="us-gaap_ScheduleOfOtherNonoperatingIncomeExpenseTableTextBlock" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquitySecuritiesMember" xlink:type="locator" xlink:label="us-gaap_EquitySecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeCategorizationMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeCategorizationMember_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeAxis" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable" xlink:type="locator" xlink:label="us-gaap_StatementTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems" xlink:type="locator" xlink:label="us-gaap_StatementLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_InvestmentTypeAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_InvestmentTypeAxis" xlink:to="us-gaap_InvestmentTypeCategorizationMember_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_InvestmentTypeAxis" xlink:to="us-gaap_InvestmentTypeCategorizationMember" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_DebtSecuritiesMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_EquitySecuritiesMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ScheduleOfOtherNonoperatingIncomeExpenseTableTextBlock" order="10180.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_RealizedGainLossOnInvestmentsTableTextBlock" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_GainLossOnInvestmentsTextBlock" order="10280.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDERIVATIVESTables" xlink:href="msft-20201231.xsd#Role_DisclosureDERIVATIVESTables" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDERIVATIVESTables">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfDerivativeInstrumentsGainLossInStatementOfFinancialPerformanceTextBlock" xlink:type="locator" xlink:label="us-gaap_ScheduleOfDerivativeInstrumentsGainLossInStatementOfFinancialPerformanceTextBlock" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock" xlink:type="locator" xlink:label="us-gaap_ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfNotionalAmountsOfOutstandingDerivativePositionsTableTextBlock" xlink:type="locator" xlink:label="us-gaap_ScheduleOfNotionalAmountsOfOutstandingDerivativePositionsTableTextBlock" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeMember" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLocationDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLocationDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationAxis" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLocationAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashFlowHedgingMember" xlink:type="locator" xlink:label="us-gaap_CashFlowHedgingMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:type="locator" xlink:label="us-gaap_HedgingRelationshipDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:type="locator" xlink:label="us-gaap_HedgingRelationshipDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementTable" xlink:type="locator" xlink:label="us-gaap_StatementTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementLineItems" xlink:type="locator" xlink:label="us-gaap_StatementLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_StatementTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:to="us-gaap_HedgingRelationshipDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:to="us-gaap_HedgingRelationshipDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingRelationshipDomain" xlink:to="us-gaap_CashFlowHedgingMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_StatementTable" xlink:to="us-gaap_OtherComprehensiveIncomeLocationAxis" order="10100.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_OtherComprehensiveIncomeLocationAxis" xlink:to="us-gaap_OtherComprehensiveIncomeLocationDomain_2" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_OtherComprehensiveIncomeLocationAxis" xlink:to="us-gaap_OtherComprehensiveIncomeLocationDomain" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:to="us-gaap_OtherComprehensiveIncomeMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ScheduleOfNotionalAmountsOfOutstandingDerivativePositionsTableTextBlock" order="10180.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ScheduleOfDerivativeInstrumentsInStatementOfFinancialPositionFairValueTextBlock" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_StatementLineItems" xlink:to="us-gaap_ScheduleOfDerivativeInstrumentsGainLossInStatementOfFinancialPerformanceTextBlock" order="10340.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureAccountingPoliciesAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureAccountingPoliciesAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureAccountingPoliciesAdditionalInformationDetail">
    <link:loc xlink:href="msft-20201231.xsd#msft_FinanceReceivablesNet" xlink:type="locator" xlink:label="msft_FinanceReceivablesNet" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccountsReceivableNetNoncurrent" xlink:type="locator" xlink:label="us-gaap_AccountsReceivableNetNoncurrent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherReceivablesGrossCurrent" xlink:type="locator" xlink:label="us-gaap_OtherReceivablesGrossCurrent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EarningsPerShareDiluted" xlink:type="locator" xlink:label="us-gaap_EarningsPerShareDiluted" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EarningsPerShareBasic" xlink:type="locator" xlink:label="us-gaap_EarningsPerShareBasic" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NetIncomeLoss" xlink:type="locator" xlink:label="us-gaap_NetIncomeLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:type="locator" xlink:label="us-gaap_OperatingIncomeLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife" xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentUsefulLife" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ServiceLifeMember" xlink:type="locator" xlink:label="us-gaap_ServiceLifeMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ChangeInAccountingEstimateTypeDomain" xlink:type="locator" xlink:label="us-gaap_ChangeInAccountingEstimateTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ChangeInAccountingEstimateTypeDomain" xlink:type="locator" xlink:label="us-gaap_ChangeInAccountingEstimateTypeDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ChangeInAccountingEstimateByTypeAxis" xlink:type="locator" xlink:label="us-gaap_ChangeInAccountingEstimateByTypeAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_NetworkEquipmentMember" xlink:type="locator" xlink:label="msft_NetworkEquipmentMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ServerEquipmentMember" xlink:type="locator" xlink:label="msft_ServerEquipmentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentTypeDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentByTypeAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_SignificantAccountingPoliciesTable" xlink:type="locator" xlink:label="msft_SignificantAccountingPoliciesTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_SignificantAccountingPoliciesLineItems" xlink:type="locator" xlink:label="msft_SignificantAccountingPoliciesLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="msft_SignificantAccountingPoliciesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_SignificantAccountingPoliciesTable" xlink:to="us-gaap_PropertyPlantAndEquipmentByTypeAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:to="us-gaap_PropertyPlantAndEquipmentTypeDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="msft_ServerEquipmentMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:to="msft_NetworkEquipmentMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_SignificantAccountingPoliciesTable" xlink:to="us-gaap_ChangeInAccountingEstimateByTypeAxis" order="10120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ChangeInAccountingEstimateByTypeAxis" xlink:to="us-gaap_ChangeInAccountingEstimateTypeDomain_2" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ChangeInAccountingEstimateByTypeAxis" xlink:to="us-gaap_ChangeInAccountingEstimateTypeDomain" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ChangeInAccountingEstimateTypeDomain" xlink:to="us-gaap_ServiceLifeMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="us-gaap_PropertyPlantAndEquipmentUsefulLife" order="10300.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="us-gaap_OperatingIncomeLoss" order="10420.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="us-gaap_NetIncomeLoss" order="10480.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="us-gaap_EarningsPerShareBasic" order="10540.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="us-gaap_EarningsPerShareDiluted" order="10600.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="us-gaap_OtherReceivablesGrossCurrent" order="10690.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="us-gaap_AccountsReceivableNetNoncurrent" order="10760.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_SignificantAccountingPoliciesLineItems" xlink:to="msft_FinanceReceivablesNet" order="10830.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureNetRecognizedGainsLossesOnDebtInvestmentsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureNetRecognizedGainsLossesOnDebtInvestmentsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureNetRecognizedGainsLossesOnDebtInvestmentsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GainLossOnInvestments" xlink:type="locator" xlink:label="us-gaap_GainLossOnInvestments" />
    <link:loc xlink:href="msft-20201231.xsd#msft_CreditLossAllowanceAndImpairmentOfInvestments" xlink:type="locator" xlink:label="msft_CreditLossAllowanceAndImpairmentOfInvestments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleRealizedGain" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleRealizedGain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeCategorizationMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeAxis" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfGainLossOnInvestmentsTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfGainLossOnInvestmentsTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:type="locator" xlink:label="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_ScheduleOfGainLossOnInvestmentsTable" order="10040.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsTable" xlink:to="us-gaap_InvestmentTypeAxis" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_InvestmentTypeAxis" xlink:to="us-gaap_InvestmentTypeCategorizationMember" order="10100.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_DebtSecuritiesMember" order="10120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleRealizedGain" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleRealizedLoss" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="msft_CreditLossAllowanceAndImpairmentOfInvestments" order="10330.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_GainLossOnInvestments" order="10410.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureNetRecognizedGainsLossesOnEquityInvestmentsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureNetRecognizedGainsLossesOnEquityInvestmentsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureNetRecognizedGainsLossesOnEquityInvestmentsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GainLossOnInvestments" xlink:type="locator" xlink:label="us-gaap_GainLossOnInvestments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ImpairmentOfInvestments" xlink:type="locator" xlink:label="us-gaap_ImpairmentOfInvestments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquitySecuritiesFvNiUnrealizedGainLoss" xlink:type="locator" xlink:label="us-gaap_EquitySecuritiesFvNiUnrealizedGainLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquitySecuritiesFvNiRealizedGainLoss" xlink:type="locator" xlink:label="us-gaap_EquitySecuritiesFvNiRealizedGainLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquitySecuritiesMember" xlink:type="locator" xlink:label="us-gaap_EquitySecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeCategorizationMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeAxis" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfGainLossOnInvestmentsTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfGainLossOnInvestmentsTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:type="locator" xlink:label="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_ScheduleOfGainLossOnInvestmentsTable" order="10040.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsTable" xlink:to="us-gaap_InvestmentTypeAxis" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_InvestmentTypeAxis" xlink:to="us-gaap_InvestmentTypeCategorizationMember" order="10100.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_EquitySecuritiesMember" order="10120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_EquitySecuritiesFvNiRealizedGainLoss" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_EquitySecuritiesFvNiUnrealizedGainLoss" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_ImpairmentOfInvestments" order="10330.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ScheduleOfGainLossOnInvestmentsIncludingMarketableSecuritiesAndInvestmentsHeldAtCostIncomeStatementReportedAmountsSummaryLineItems" xlink:to="us-gaap_GainLossOnInvestments" order="10410.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureInvestmentComponentsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureInvestmentComponentsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureInvestmentComponentsDetail">
    <link:loc xlink:href="msft-20201231.xsd#msft_CashCashEquivalentsAndInvestments" xlink:type="locator" xlink:label="msft_CashCashEquivalentsAndInvestments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongTermInvestments" xlink:type="locator" xlink:label="us-gaap_LongTermInvestments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShortTermInvestments" xlink:type="locator" xlink:label="us-gaap_ShortTermInvestments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:type="locator" xlink:label="us-gaap_CashAndCashEquivalentsAtCarryingValue" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeAssets" xlink:type="locator" xlink:label="us-gaap_DerivativeAssets" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Cash" xlink:type="locator" xlink:label="us-gaap_Cash" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquitySecuritiesFvNi" xlink:type="locator" xlink:label="us-gaap_EquitySecuritiesFvNi" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleSecuritiesDebtSecurities" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:type="locator" xlink:label="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeMember" xlink:type="locator" xlink:label="us-gaap_DerivativeMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashMember" xlink:type="locator" xlink:label="us-gaap_CashMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_OtherMeasurementMember" xlink:type="locator" xlink:label="msft_OtherMeasurementMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_MeasurementInputTypeDomain" xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_MeasurementInputTypeDomain" xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_MeasurementInputTypeAxis" xlink:type="locator" xlink:label="us-gaap_MeasurementInputTypeAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquitySecuritiesMember" xlink:type="locator" xlink:label="us-gaap_EquitySecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel3Member" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueInputsLevel1Member" xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel1Member" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel2Member" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:type="locator" xlink:label="us-gaap_FairValueByFairValueHierarchyLevelAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:type="locator" xlink:label="us-gaap_USStatesAndPoliticalSubdivisionsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_CorporateDebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_AssetBackedSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ForeignGovernmentDebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_ForeignGovernmentDebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_USGovernmentAgenciesDebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_USGovernmentAgenciesDebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_USTreasurySecuritiesMember" xlink:type="locator" xlink:label="us-gaap_USTreasurySecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CertificatesOfDepositMember" xlink:type="locator" xlink:label="us-gaap_CertificatesOfDepositMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CommercialPaperMember" xlink:type="locator" xlink:label="us-gaap_CommercialPaperMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeCategorizationMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeAxis" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:type="locator" xlink:label="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:type="locator" xlink:label="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueByAssetClassAxis" xlink:type="locator" xlink:label="us-gaap_FairValueByAssetClassAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_CashCashEquivalentsAndInvestmentsTable" xlink:type="locator" xlink:label="msft_CashCashEquivalentsAndInvestmentsTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:type="locator" xlink:label="msft_CashCashEquivalentsAndInvestmentsLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="msft_CashCashEquivalentsAndInvestmentsTable" order="10070.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_CashCashEquivalentsAndInvestmentsTable" xlink:to="us-gaap_FairValueByAssetClassAxis" order="10100.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByAssetClassAxis" xlink:to="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_2" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByAssetClassAxis" xlink:to="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:to="us-gaap_DebtSecuritiesMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_CashCashEquivalentsAndInvestmentsTable" xlink:to="us-gaap_InvestmentTypeAxis" order="10360.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_InvestmentTypeAxis" xlink:to="us-gaap_InvestmentTypeCategorizationMember" order="10390.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_CommercialPaperMember" order="10410.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_CertificatesOfDepositMember" order="10430.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_USTreasurySecuritiesMember" order="10450.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_USGovernmentAgenciesDebtSecuritiesMember" order="10470.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_ForeignGovernmentDebtSecuritiesMember" order="10490.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_AssetBackedSecuritiesMember" order="10510.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_CorporateDebtSecuritiesMember" order="10530.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_USStatesAndPoliticalSubdivisionsMember" order="10570.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_CashCashEquivalentsAndInvestmentsTable" xlink:to="us-gaap_FairValueByFairValueHierarchyLevelAxis" order="10600.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain_2" order="10610.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" order="10630.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel2Member" order="10650.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel1Member" order="10690.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel3Member" order="10790.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_EquitySecuritiesMember" order="10890.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_CashCashEquivalentsAndInvestmentsTable" xlink:to="us-gaap_MeasurementInputTypeAxis" order="11000.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_MeasurementInputTypeAxis" xlink:to="us-gaap_MeasurementInputTypeDomain_2" order="11010.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_MeasurementInputTypeAxis" xlink:to="us-gaap_MeasurementInputTypeDomain" order="11030.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_MeasurementInputTypeDomain" xlink:to="msft_OtherMeasurementMember" order="11050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_CashMember" order="11110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_DerivativeMember" order="11170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" order="12280.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" order="12700.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" order="13120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_AvailableForSaleSecuritiesDebtSecurities" order="13540.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_EquitySecuritiesFvNi" order="13960.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_Cash" order="14380.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_DerivativeAssets" order="14800.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_CashAndCashEquivalentsAtCarryingValue" order="15220.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_ShortTermInvestments" order="15640.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="us-gaap_LongTermInvestments" order="16060.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_CashCashEquivalentsAndInvestmentsLineItems" xlink:to="msft_CashCashEquivalentsAndInvestments" order="21640.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnrealizedLossesOnDebtInvestmentsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureUnrealizedLossesOnDebtInvestmentsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnrealizedLossesOnDebtInvestmentsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months" xlink:type="locator" xlink:label="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:type="locator" xlink:label="us-gaap_USStatesAndPoliticalSubdivisionsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_CorporateDebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_AssetBackedSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ForeignGovernmentDebtSecuritiesMember" xlink:type="locator" xlink:label="us-gaap_ForeignGovernmentDebtSecuritiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:type="locator" xlink:label="us-gaap_USTreasuryAndGovernmentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeCategorizationMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InvestmentTypeAxis" xlink:type="locator" xlink:label="us-gaap_InvestmentTypeAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_InvestmentsUnrealizedLossPositionTable" xlink:type="locator" xlink:label="msft_InvestmentsUnrealizedLossPositionTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_InvestmentsUnrealizedLossPositionLineItems" xlink:type="locator" xlink:label="msft_InvestmentsUnrealizedLossPositionLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_InvestmentsUnrealizedLossPositionLineItems" xlink:to="msft_InvestmentsUnrealizedLossPositionTable" order="10050.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_InvestmentsUnrealizedLossPositionTable" xlink:to="us-gaap_InvestmentTypeAxis" order="10080.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_InvestmentTypeAxis" xlink:to="us-gaap_InvestmentTypeCategorizationMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_USTreasuryAndGovernmentMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_ForeignGovernmentDebtSecuritiesMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_AssetBackedSecuritiesMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_CorporateDebtSecuritiesMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_InvestmentTypeCategorizationMember" xlink:to="us-gaap_USStatesAndPoliticalSubdivisionsMember" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_InvestmentsUnrealizedLossPositionLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months" order="10380.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_InvestmentsUnrealizedLossPositionLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" order="10560.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_InvestmentsUnrealizedLossPositionLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger" order="10740.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_InvestmentsUnrealizedLossPositionLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" order="10920.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_InvestmentsUnrealizedLossPositionLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition" order="11100.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_InvestmentsUnrealizedLossPositionLineItems" xlink:to="us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss" order="11280.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDerivativesAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureDerivativesAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDerivativesAdditionalInformationDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeLiability" xlink:type="locator" xlink:label="us-gaap_DerivativeFairValueOfDerivativeLiability" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeFairValueOfDerivativeAsset" xlink:type="locator" xlink:label="us-gaap_DerivativeFairValueOfDerivativeAsset" />
    <link:loc xlink:href="msft-20201231.xsd#msft_FinancialInstrumentCovenantMinimumLiquidity" xlink:type="locator" xlink:label="msft_FinancialInstrumentCovenantMinimumLiquidity" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentCreditRating" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentCreditRating" />
    <link:loc xlink:href="msft-20201231.xsd#msft_FinancialInstrumentCovenantMinimumLiquidityRequirement" xlink:type="locator" xlink:label="msft_FinancialInstrumentCovenantMinimumLiquidityRequirement" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_UnsecuredDebtMember" xlink:type="locator" xlink:label="us-gaap_UnsecuredDebtMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:type="locator" xlink:label="us-gaap_LongtermDebtTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:type="locator" xlink:label="us-gaap_LongtermDebtTypeDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:type="locator" xlink:label="us-gaap_LongtermDebtTypeAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeTable" xlink:type="locator" xlink:label="us-gaap_DerivativeTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeLineItems" xlink:type="locator" xlink:label="us-gaap_DerivativeLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DerivativeLineItems" xlink:to="us-gaap_DerivativeTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeTable" xlink:to="us-gaap_LongtermDebtTypeAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_LongtermDebtTypeAxis" xlink:to="us-gaap_LongtermDebtTypeDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_LongtermDebtTypeAxis" xlink:to="us-gaap_LongtermDebtTypeDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LongtermDebtTypeDomain" xlink:to="us-gaap_UnsecuredDebtMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeLineItems" xlink:to="msft_FinancialInstrumentCovenantMinimumLiquidityRequirement" order="10120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeLineItems" xlink:to="us-gaap_DebtInstrumentCreditRating" order="10160.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeLineItems" xlink:to="msft_FinancialInstrumentCovenantMinimumLiquidity" order="10200.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeLineItems" xlink:to="us-gaap_DerivativeFairValueOfDerivativeAsset" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeLineItems" xlink:to="us-gaap_DerivativeFairValueOfDerivativeLiability" order="10310.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureNotionalAmountsOfOutstandingDerivativeInstrumentsMeasuredInUSDollarEquivalentsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureNotionalAmountsOfOutstandingDerivativeInstrumentsMeasuredInUSDollarEquivalentsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureNotionalAmountsOfOutstandingDerivativeInstrumentsMeasuredInUSDollarEquivalentsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeNotionalAmount" xlink:type="locator" xlink:label="us-gaap_DerivativeNotionalAmount" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShortMember" xlink:type="locator" xlink:label="us-gaap_ShortMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongMember" xlink:type="locator" xlink:label="us-gaap_LongMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PositionDomain" xlink:type="locator" xlink:label="us-gaap_PositionDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PositionDomain" xlink:type="locator" xlink:label="us-gaap_PositionDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PositionAxis" xlink:type="locator" xlink:label="us-gaap_PositionAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherContractMember" xlink:type="locator" xlink:label="us-gaap_OtherContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InterestRateContractMember" xlink:type="locator" xlink:label="us-gaap_InterestRateContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:type="locator" xlink:label="us-gaap_ForeignExchangeContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NondesignatedMember" xlink:type="locator" xlink:label="us-gaap_NondesignatedMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:type="locator" xlink:label="us-gaap_DesignatedAsHedgingInstrumentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:type="locator" xlink:label="us-gaap_HedgingDesignationDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:type="locator" xlink:label="us-gaap_HedgingDesignationDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:type="locator" xlink:label="us-gaap_HedgingDesignationAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeTable" xlink:type="locator" xlink:label="us-gaap_DerivativeTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeLineItems" xlink:type="locator" xlink:label="us-gaap_DerivativeLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DerivativeLineItems" xlink:to="us-gaap_DerivativeTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeTable" xlink:to="us-gaap_HedgingDesignationAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_HedgingDesignationAxis" xlink:to="us-gaap_HedgingDesignationDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_HedgingDesignationAxis" xlink:to="us-gaap_HedgingDesignationDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingDesignationDomain" xlink:to="us-gaap_DesignatedAsHedgingInstrumentMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingDesignationDomain" xlink:to="us-gaap_NondesignatedMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="10220.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain_2" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_ForeignExchangeContractMember" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_InterestRateContractMember" order="10310.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_OtherContractMember" order="10370.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeTable" xlink:to="us-gaap_PositionAxis" order="10400.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_PositionAxis" xlink:to="us-gaap_PositionDomain_2" order="10410.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_PositionAxis" xlink:to="us-gaap_PositionDomain" order="10430.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PositionDomain" xlink:to="us-gaap_LongMember" order="10450.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_PositionDomain" xlink:to="us-gaap_ShortMember" order="10470.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeLineItems" xlink:to="us-gaap_DerivativeNotionalAmount" order="10600.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureFairValuesOfDerivativeInstrumentsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureFairValuesOfDerivativeInstrumentsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureFairValuesOfDerivativeInstrumentsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeLiabilities" xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilities" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeCollateralObligationToReturnCash" xlink:type="locator" xlink:label="us-gaap_DerivativeCollateralObligationToReturnCash" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeLiabilityFairValueGrossAsset" xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilityFairValueGrossAsset" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement" xlink:type="locator" xlink:label="us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeAssets" xlink:type="locator" xlink:label="us-gaap_DerivativeAssets" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeCollateralRightToReclaimCash" xlink:type="locator" xlink:label="us-gaap_DerivativeCollateralRightToReclaimCash" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeAssetFairValueGrossLiability" xlink:type="locator" xlink:label="us-gaap_DerivativeAssetFairValueGrossLiability" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement" xlink:type="locator" xlink:label="us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel3Member" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel2Member" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueInputsLevel1Member" xlink:type="locator" xlink:label="us-gaap_FairValueInputsLevel1Member" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:type="locator" xlink:label="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:type="locator" xlink:label="us-gaap_FairValueByFairValueHierarchyLevelAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherNoncurrentLiabilitiesMember" xlink:type="locator" xlink:label="us-gaap_OtherNoncurrentLiabilitiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherCurrentLiabilitiesMember" xlink:type="locator" xlink:label="us-gaap_OtherCurrentLiabilitiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherContractMember" xlink:type="locator" xlink:label="us-gaap_OtherContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InterestRateContractMember" xlink:type="locator" xlink:label="us-gaap_InterestRateContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:type="locator" xlink:label="us-gaap_ForeignExchangeContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NondesignatedMember" xlink:type="locator" xlink:label="us-gaap_NondesignatedMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DesignatedAsHedgingInstrumentMember" xlink:type="locator" xlink:label="us-gaap_DesignatedAsHedgingInstrumentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingDesignationDomain" xlink:type="locator" xlink:label="us-gaap_HedgingDesignationDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingDesignationAxis" xlink:type="locator" xlink:label="us-gaap_HedgingDesignationAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherNoncurrentAssetsMember" xlink:type="locator" xlink:label="us-gaap_OtherNoncurrentAssetsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherCurrentAssetsMember" xlink:type="locator" xlink:label="us-gaap_OtherCurrentAssetsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShortTermInvestmentsMember" xlink:type="locator" xlink:label="us-gaap_ShortTermInvestmentsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:type="locator" xlink:label="us-gaap_BalanceSheetLocationDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:type="locator" xlink:label="us-gaap_BalanceSheetLocationDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BalanceSheetLocationAxis" xlink:type="locator" xlink:label="us-gaap_BalanceSheetLocationAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" xlink:type="locator" xlink:label="us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativesFairValueLineItems" xlink:type="locator" xlink:label="us-gaap_DerivativesFairValueLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" order="10070.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" xlink:to="us-gaap_BalanceSheetLocationAxis" order="10100.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_BalanceSheetLocationAxis" xlink:to="us-gaap_BalanceSheetLocationDomain_2" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_BalanceSheetLocationAxis" xlink:to="us-gaap_BalanceSheetLocationDomain" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="us-gaap_ShortTermInvestmentsMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="us-gaap_OtherCurrentAssetsMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="us-gaap_OtherNoncurrentAssetsMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" xlink:to="us-gaap_HedgingDesignationAxis" order="10200.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_HedgingDesignationAxis" xlink:to="us-gaap_HedgingDesignationDomain" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingDesignationDomain" xlink:to="us-gaap_DesignatedAsHedgingInstrumentMember" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingDesignationDomain" xlink:to="us-gaap_NondesignatedMember" order="10290.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="10320.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="10350.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_ForeignExchangeContractMember" order="10370.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_InterestRateContractMember" order="10390.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_OtherContractMember" order="10430.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="us-gaap_OtherCurrentLiabilitiesMember" order="10490.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="us-gaap_OtherNoncurrentLiabilitiesMember" order="10510.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable" xlink:to="us-gaap_FairValueByFairValueHierarchyLevelAxis" order="10760.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:to="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" order="10790.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel1Member" order="10810.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel2Member" order="10830.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:to="us-gaap_FairValueInputsLevel3Member" order="10850.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeAssetFairValueGrossAssetIncludingNotSubjectToMasterNettingArrangement" order="10880.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeAssetFairValueGrossLiability" order="11080.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeCollateralRightToReclaimCash" order="11120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeAssets" order="11160.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeLiabilityFairValueGrossLiabilityIncludingNotSubjectToMasterNettingArrangement" order="11390.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeLiabilityFairValueGrossAsset" order="11590.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeCollateralObligationToReturnCash" order="11630.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativesFairValueLineItems" xlink:to="us-gaap_DerivativeLiabilities" order="11670.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureGainsLossesOnDerivativeInstrumentsRecognizedOnConsolidatedIncomeStatementsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureGainsLossesOnDerivativeInstrumentsRecognizedOnConsolidatedIncomeStatementsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureGainsLossesOnDerivativeInstrumentsRecognizedOnConsolidatedIncomeStatementsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GainLossFromComponentsExcludedFromAssessmentOfCashFlowHedgeEffectivenessNet" xlink:type="locator" xlink:label="us-gaap_GainLossFromComponentsExcludedFromAssessmentOfCashFlowHedgeEffectivenessNet" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GainLossFromComponentsExcludedFromAssessmentOfFairValueHedgeEffectivenessNet" xlink:type="locator" xlink:label="us-gaap_GainLossFromComponentsExcludedFromAssessmentOfFairValueHedgeEffectivenessNet" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1" xlink:type="locator" xlink:label="us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1" xlink:type="locator" xlink:label="us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherContractMember" xlink:type="locator" xlink:label="us-gaap_OtherContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InterestRateContractMember" xlink:type="locator" xlink:label="us-gaap_InterestRateContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:type="locator" xlink:label="us-gaap_ForeignExchangeContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NonoperatingIncomeExpenseMember" xlink:type="locator" xlink:label="us-gaap_NonoperatingIncomeExpenseMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SalesMember" xlink:type="locator" xlink:label="us-gaap_SalesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashFlowHedgingMember" xlink:type="locator" xlink:label="us-gaap_CashFlowHedgingMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FairValueHedgingMember" xlink:type="locator" xlink:label="us-gaap_FairValueHedgingMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:type="locator" xlink:label="us-gaap_HedgingRelationshipDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsGainLossLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" xlink:to="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:to="us-gaap_HedgingRelationshipDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingRelationshipDomain" xlink:to="us-gaap_FairValueHedgingMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingRelationshipDomain" xlink:to="us-gaap_CashFlowHedgingMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" xlink:to="us-gaap_IncomeStatementLocationAxis" order="10220.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain_2" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_SalesMember" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_NonoperatingIncomeExpenseMember" order="10290.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="10420.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="10450.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_ForeignExchangeContractMember" order="10470.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_InterestRateContractMember" order="10530.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_OtherContractMember" order="10630.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_ChangeInUnrealizedGainLossOnFairValueHedgingInstruments1" order="10660.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_ChangeInUnrealizedGainLossOnHedgedItemInFairValueHedge1" order="10820.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_GainLossFromComponentsExcludedFromAssessmentOfFairValueHedgeEffectivenessNet" order="10980.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationBeforeTax" order="11460.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_GainLossFromComponentsExcludedFromAssessmentOfCashFlowHedgeEffectivenessNet" order="11620.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet" order="11780.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureGainsLossesNetOfTaxOnDerivativeInstrumentsRecognizedOnConsolidatedComprehensiveIncomeStatementsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureGainsLossesNetOfTaxOnDerivativeInstrumentsRecognizedOnConsolidatedComprehensiveIncomeStatementsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureGainsLossesNetOfTaxOnDerivativeInstrumentsRecognizedOnConsolidatedComprehensiveIncomeStatementsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ForeignExchangeContractMember" xlink:type="locator" xlink:label="us-gaap_ForeignExchangeContractMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeContractTypeDomain" xlink:type="locator" xlink:label="us-gaap_DerivativeContractTypeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentRiskAxis" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentRiskAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CashFlowHedgingMember" xlink:type="locator" xlink:label="us-gaap_CashFlowHedgingMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_HedgingRelationshipDomain" xlink:type="locator" xlink:label="us-gaap_HedgingRelationshipDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:type="locator" xlink:label="us-gaap_DerivativeInstrumentsGainLossLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" xlink:to="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis" xlink:to="us-gaap_HedgingRelationshipDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_HedgingRelationshipDomain" xlink:to="us-gaap_CashFlowHedgingMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipByIncomeStatementLocationByDerivativeInstrumentRiskTable" xlink:to="us-gaap_DerivativeInstrumentRiskAxis" order="10100.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DerivativeInstrumentRiskAxis" xlink:to="us-gaap_DerivativeContractTypeDomain" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeContractTypeDomain" xlink:to="us-gaap_ForeignExchangeContractMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DerivativeInstrumentsGainLossLineItems" xlink:to="us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax" order="10180.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureBusinessCombinationsAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureBusinessCombinationsAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureBusinessCombinationsAdditionalInformationDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionDateOfAcquisitionAgreement1" xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionDateOfAcquisitionAgreement1" />
    <link:loc xlink:href="msft-20201231.xsd#msft_CashToBePaidToAcquireBusiness" xlink:type="locator" xlink:label="msft_CashToBePaidToAcquireBusiness" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ZeniMaxMediaIncMember" xlink:type="locator" xlink:label="msft_ZeniMaxMediaIncMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionAcquireeDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionAcquireeDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:type="locator" xlink:label="us-gaap_BusinessAcquisitionLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_BusinessAcquisitionLineItems" xlink:to="us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:to="us-gaap_BusinessAcquisitionAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_BusinessAcquisitionAxis" xlink:to="us-gaap_BusinessAcquisitionAcquireeDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_BusinessAcquisitionAxis" xlink:to="us-gaap_BusinessAcquisitionAcquireeDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BusinessAcquisitionAcquireeDomain" xlink:to="msft_ZeniMaxMediaIncMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BusinessAcquisitionLineItems" xlink:to="msft_CashToBePaidToAcquireBusiness" order="10140.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BusinessAcquisitionLineItems" xlink:to="us-gaap_BusinessAcquisitionDateOfAcquisitionAgreement1" order="10160.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureCarryingAmountOfGoodwillDetail" xlink:href="msft-20201231.xsd#Role_DisclosureCarryingAmountOfGoodwillDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureCarryingAmountOfGoodwillDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillOtherIncreaseDecrease" xlink:type="locator" xlink:label="us-gaap_GoodwillOtherIncreaseDecrease" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillAcquiredDuringPeriod" xlink:type="locator" xlink:label="us-gaap_GoodwillAcquiredDuringPeriod" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_Goodwill" xlink:type="locator" xlink:label="us-gaap_Goodwill" />
    <link:loc xlink:href="msft-20201231.xsd#msft_MorePersonalComputingMember" xlink:type="locator" xlink:label="msft_MorePersonalComputingMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IntelligentCloudMember" xlink:type="locator" xlink:label="msft_IntelligentCloudMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ProductivityAndBusinessProcessesMember" xlink:type="locator" xlink:label="msft_ProductivityAndBusinessProcessesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain" xlink:type="locator" xlink:label="us-gaap_SegmentDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain" xlink:type="locator" xlink:label="us-gaap_SegmentDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfGoodwillTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfGoodwillTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_GoodwillLineItems" xlink:type="locator" xlink:label="us-gaap_GoodwillLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_GoodwillLineItems" xlink:to="us-gaap_ScheduleOfGoodwillTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfGoodwillTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_ProductivityAndBusinessProcessesMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_IntelligentCloudMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_MorePersonalComputingMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_GoodwillLineItems" xlink:to="us-gaap_Goodwill" order="10160.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_GoodwillLineItems" xlink:to="us-gaap_GoodwillAcquiredDuringPeriod" order="10260.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_GoodwillLineItems" xlink:to="us-gaap_GoodwillOtherIncreaseDecrease" order="10360.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureFiniteLivedIntangibleAssetsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureFiniteLivedIntangibleAssetsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureFiniteLivedIntangibleAssetsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsNet" xlink:type="locator" xlink:label="us-gaap_FiniteLivedIntangibleAssetsNet" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" xlink:type="locator" xlink:label="us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsGross" xlink:type="locator" xlink:label="us-gaap_FiniteLivedIntangibleAssetsGross" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractualRightsMember" xlink:type="locator" xlink:label="us-gaap_ContractualRightsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_MarketingRelatedIntangibleAssetsMember" xlink:type="locator" xlink:label="us-gaap_MarketingRelatedIntangibleAssetsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_CustomerRelationshipsMember" xlink:type="locator" xlink:label="us-gaap_CustomerRelationshipsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TechnologyBasedIntangibleAssetsMember" xlink:type="locator" xlink:label="us-gaap_TechnologyBasedIntangibleAssetsMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:type="locator" xlink:label="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:type="locator" xlink:label="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:type="locator" xlink:label="us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:type="locator" xlink:label="us-gaap_FiniteLivedIntangibleAssetsLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:to="us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" order="10030.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" xlink:to="us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" order="10060.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:to="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_2" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis" xlink:to="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:to="us-gaap_TechnologyBasedIntangibleAssetsMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:to="us-gaap_CustomerRelationshipsMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:to="us-gaap_MarketingRelatedIntangibleAssetsMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:to="us-gaap_ContractualRightsMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:to="us-gaap_FiniteLivedIntangibleAssetsGross" order="10200.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:to="us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization" order="10340.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:to="us-gaap_FiniteLivedIntangibleAssetsNet" order="10480.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDebtDetail" xlink:href="msft-20201231.xsd#Role_DisclosureDebtDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDebtDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongTermDebtNoncurrent" xlink:type="locator" xlink:label="us-gaap_LongTermDebtNoncurrent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongTermDebtCurrent" xlink:type="locator" xlink:label="us-gaap_LongTermDebtCurrent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LongTermDebt" xlink:type="locator" xlink:label="us-gaap_LongTermDebt" />
    <link:loc xlink:href="msft-20201231.xsd#msft_PremiumOnDebtExchange1" xlink:type="locator" xlink:label="msft_PremiumOnDebtExchange1" />
    <link:loc xlink:href="msft-20201231.xsd#msft_HedgeAccountingFairValueAdjustments" xlink:type="locator" xlink:label="msft_HedgeAccountingFairValueAdjustments" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentUnamortizedDiscountPremiumAndDebtIssuanceCostsNet" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentUnamortizedDiscountPremiumAndDebtIssuanceCostsNet" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentCarryingAmount" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentInterestRateEffectivePercentage" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentInterestRateEffectivePercentage" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentInterestRateStatedPercentage" />
    <link:loc xlink:href="msft-20201231.xsd#msft_DebtInstrumentMaturityYear" xlink:type="locator" xlink:label="msft_DebtInstrumentMaturityYear" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MaximumMember" xlink:type="locator" xlink:label="srt_MaximumMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MinimumMember" xlink:type="locator" xlink:label="srt_MinimumMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember" xlink:type="locator" xlink:label="srt_RangeMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember" xlink:type="locator" xlink:label="srt_RangeMember_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeAxis" xlink:type="locator" xlink:label="srt_RangeAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtTenMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtTenMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtNineMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtNineMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtEightMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtEightMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtSevenMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtSevenMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtSixMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtSixMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtFiveMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtFiveMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtFourMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtFourMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtThreeMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtThreeMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtTwoMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtTwoMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtOneMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtOneMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentNameDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentNameDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DebtInstrumentTable" xlink:to="us-gaap_DebtInstrumentAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_DebtInstrumentAxis" xlink:to="us-gaap_DebtInstrumentNameDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DebtInstrumentAxis" xlink:to="us-gaap_DebtInstrumentNameDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtOneMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtTwoMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtThreeMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtFourMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtFiveMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtSixMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtSevenMember" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtEightMember" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtNineMember" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtTenMember" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DebtInstrumentTable" xlink:to="srt_RangeAxis" order="10280.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember_2" order="10290.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="10310.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="10330.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="10350.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="msft_DebtInstrumentMaturityYear" order="10540.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentInterestRateStatedPercentage" order="11620.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentInterestRateEffectivePercentage" order="12700.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentCarryingAmount" order="13780.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentUnamortizedDiscountPremiumAndDebtIssuanceCostsNet" order="14610.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="msft_HedgeAccountingFairValueAdjustments" order="14650.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="msft_PremiumOnDebtExchange1" order="14690.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_LongTermDebt" order="14730.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_LongTermDebtCurrent" order="14810.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_LongTermDebtNoncurrent" order="14850.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDebtParentheticalDetail" xlink:href="msft-20201231.xsd#Role_DisclosureDebtParentheticalDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureDebtParentheticalDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentFaceAmount" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentFaceAmount" />
    <link:loc xlink:href="msft-20201231.xsd#msft_DebtInstrumentIssuanceYear" xlink:type="locator" xlink:label="msft_DebtInstrumentIssuanceYear" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtTenMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtTenMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtNineMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtNineMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtEightMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtEightMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtSevenMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtSevenMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtSixMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtSixMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtFiveMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtFiveMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtFourMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtFourMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtThreeMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtThreeMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtTwoMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtTwoMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IssuanceOfLongTermDebtOneMember" xlink:type="locator" xlink:label="msft_IssuanceOfLongTermDebtOneMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentNameDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:type="locator" xlink:label="us-gaap_DebtInstrumentLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_DebtInstrumentTable" xlink:to="us-gaap_DebtInstrumentAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_DebtInstrumentAxis" xlink:to="us-gaap_DebtInstrumentNameDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtOneMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtTwoMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtThreeMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtFourMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtFiveMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtSixMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtSevenMember" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtEightMember" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtNineMember" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentNameDomain" xlink:to="msft_IssuanceOfLongTermDebtTenMember" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="msft_DebtInstrumentIssuanceYear" order="10300.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_DebtInstrumentLineItems" xlink:to="us-gaap_DebtInstrumentFaceAmount" order="10520.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureIncomeTaxesAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureIncomeTaxesAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureIncomeTaxesAdditionalInformationDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccruedIncomeTaxesNoncurrent" xlink:type="locator" xlink:label="us-gaap_AccruedIncomeTaxesNoncurrent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EffectiveIncomeTaxRateContinuingOperations" xlink:type="locator" xlink:label="us-gaap_EffectiveIncomeTaxRateContinuingOperations" />
    <link:loc xlink:href="msft-20201231.xsd#msft_UnrecognizedTaxBenefitsAndOtherIncomeTaxLiabilitiesMember" xlink:type="locator" xlink:label="msft_UnrecognizedTaxBenefitsAndOtherIncomeTaxLiabilitiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityAxis" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IncomeTaxesTable" xlink:type="locator" xlink:label="msft_IncomeTaxesTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IncomeTaxesLineItems" xlink:type="locator" xlink:label="msft_IncomeTaxesLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_IncomeTaxesLineItems" xlink:to="msft_IncomeTaxesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_IncomeTaxesTable" xlink:to="us-gaap_IncomeTaxAuthorityAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_IncomeTaxAuthorityAxis" xlink:to="us-gaap_IncomeTaxAuthorityDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeTaxAuthorityAxis" xlink:to="us-gaap_IncomeTaxAuthorityDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxAuthorityDomain" xlink:to="msft_UnrecognizedTaxBenefitsAndOtherIncomeTaxLiabilitiesMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_IncomeTaxesLineItems" xlink:to="us-gaap_EffectiveIncomeTaxRateContinuingOperations" order="10120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_IncomeTaxesLineItems" xlink:to="us-gaap_AccruedIncomeTaxesNoncurrent" order="10230.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureIncomeTaxesAdditionalInformationRegardingExaminationsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureIncomeTaxesAdditionalInformationRegardingExaminationsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureIncomeTaxesAdditionalInformationRegardingExaminationsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OpenTaxYear" xlink:type="locator" xlink:label="us-gaap_OpenTaxYear" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_UnrecognizedTaxBenefitsDecreasesResultingFromSettlementsWithTaxingAuthorities" xlink:type="locator" xlink:label="us-gaap_UnrecognizedTaxBenefitsDecreasesResultingFromSettlementsWithTaxingAuthorities" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxExaminationYearUnderExamination" xlink:type="locator" xlink:label="us-gaap_IncomeTaxExaminationYearUnderExamination" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ForeignCountryMember" xlink:type="locator" xlink:label="us-gaap_ForeignCountryMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityAxis" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LatestTaxYearMember" xlink:type="locator" xlink:label="us-gaap_LatestTaxYearMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EarliestTaxYearMember" xlink:type="locator" xlink:label="us-gaap_EarliestTaxYearMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TaxPeriodDomain" xlink:type="locator" xlink:label="us-gaap_TaxPeriodDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TaxPeriodDomain" xlink:type="locator" xlink:label="us-gaap_TaxPeriodDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_TaxPeriodAxis" xlink:type="locator" xlink:label="us-gaap_TaxPeriodAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_InternalRevenueServiceIRSMember" xlink:type="locator" xlink:label="us-gaap_InternalRevenueServiceIRSMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityNameDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityNameDomain" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityNameDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxAuthorityNameAxis" xlink:type="locator" xlink:label="us-gaap_IncomeTaxAuthorityNameAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxExaminationTable" xlink:type="locator" xlink:label="us-gaap_IncomeTaxExaminationTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeTaxExaminationLineItems" xlink:type="locator" xlink:label="us-gaap_IncomeTaxExaminationLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_IncomeTaxExaminationLineItems" xlink:to="us-gaap_IncomeTaxExaminationTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_IncomeTaxExaminationTable" xlink:to="us-gaap_IncomeTaxAuthorityNameAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_IncomeTaxAuthorityNameAxis" xlink:to="us-gaap_IncomeTaxAuthorityNameDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeTaxAuthorityNameAxis" xlink:to="us-gaap_IncomeTaxAuthorityNameDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxAuthorityNameDomain" xlink:to="us-gaap_InternalRevenueServiceIRSMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_IncomeTaxExaminationTable" xlink:to="us-gaap_TaxPeriodAxis" order="10140.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_TaxPeriodAxis" xlink:to="us-gaap_TaxPeriodDomain_2" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_TaxPeriodAxis" xlink:to="us-gaap_TaxPeriodDomain" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TaxPeriodDomain" xlink:to="us-gaap_EarliestTaxYearMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_TaxPeriodDomain" xlink:to="us-gaap_LatestTaxYearMember" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_IncomeTaxExaminationTable" xlink:to="us-gaap_IncomeTaxAuthorityAxis" order="10220.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeTaxAuthorityAxis" xlink:to="us-gaap_IncomeTaxAuthorityDomain" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxAuthorityDomain" xlink:to="us-gaap_ForeignCountryMember" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxExaminationLineItems" xlink:to="us-gaap_IncomeTaxExaminationYearUnderExamination" order="10380.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxExaminationLineItems" xlink:to="us-gaap_UnrecognizedTaxBenefitsDecreasesResultingFromSettlementsWithTaxingAuthorities" order="10700.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeTaxExaminationLineItems" xlink:to="us-gaap_OpenTaxYear" order="10780.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueBySegmentDetail" xlink:href="msft-20201231.xsd#Role_DisclosureUnearnedRevenueBySegmentDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueBySegmentDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ContractWithCustomerLiability" xlink:type="locator" xlink:label="us-gaap_ContractWithCustomerLiability" />
    <link:loc xlink:href="msft-20201231.xsd#msft_MorePersonalComputingMember" xlink:type="locator" xlink:label="msft_MorePersonalComputingMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IntelligentCloudMember" xlink:type="locator" xlink:label="msft_IntelligentCloudMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ProductivityAndBusinessProcessesMember" xlink:type="locator" xlink:label="msft_ProductivityAndBusinessProcessesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain" xlink:type="locator" xlink:label="us-gaap_SegmentDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ContractWithCustomerLiabilityTable" xlink:type="locator" xlink:label="msft_ContractWithCustomerLiabilityTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ContractWithCustomerLiabilityLineItems" xlink:type="locator" xlink:label="msft_ContractWithCustomerLiabilityLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_ContractWithCustomerLiabilityLineItems" xlink:to="msft_ContractWithCustomerLiabilityTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_ContractWithCustomerLiabilityTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_ProductivityAndBusinessProcessesMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_IntelligentCloudMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_MorePersonalComputingMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ContractWithCustomerLiabilityLineItems" xlink:to="us-gaap_ContractWithCustomerLiability" order="10160.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureUnearnedRevenueAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueAdditionalInformationDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligation" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligation" />
    <link:loc xlink:href="msft-20201231.xsd#msft_CommercialCustomersMember" xlink:type="locator" xlink:label="msft_CommercialCustomersMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_NameOfMajorCustomerDomain" xlink:type="locator" xlink:label="srt_NameOfMajorCustomerDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_NameOfMajorCustomerDomain" xlink:type="locator" xlink:label="srt_NameOfMajorCustomerDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MajorCustomersAxis" xlink:type="locator" xlink:label="srt_MajorCustomersAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ContractWithCustomerLiabilityTable" xlink:type="locator" xlink:label="msft_ContractWithCustomerLiabilityTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ContractWithCustomerLiabilityLineItems" xlink:type="locator" xlink:label="msft_ContractWithCustomerLiabilityLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_ContractWithCustomerLiabilityLineItems" xlink:to="msft_ContractWithCustomerLiabilityTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_ContractWithCustomerLiabilityTable" xlink:to="srt_MajorCustomersAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_MajorCustomersAxis" xlink:to="srt_NameOfMajorCustomerDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_MajorCustomersAxis" xlink:to="srt_NameOfMajorCustomerDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_NameOfMajorCustomerDomain" xlink:to="msft_CommercialCustomersMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ContractWithCustomerLiabilityLineItems" xlink:to="us-gaap_RevenueRemainingPerformanceObligation" order="10120.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueRemainingPerformanceObligationAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureUnearnedRevenueRemainingPerformanceObligationAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueRemainingPerformanceObligationAdditionalInformationDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationPercentage" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationPercentage" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTable" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:to="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTable" xlink:to="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:to="us-gaap_RevenueRemainingPerformanceObligationPercentage" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:to="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1" order="10090.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueRemainingPerformanceObligationAdditionalInformationDetailDefault" xlink:href="msft-20201231.xsd#Role_DisclosureUnearnedRevenueRemainingPerformanceObligationAdditionalInformationDetailDefault" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureUnearnedRevenueRemainingPerformanceObligationAdditionalInformationDetailDefault">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationPercentage" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationPercentage" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTable" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:type="locator" xlink:label="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:to="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:to="us-gaap_RevenueRemainingPerformanceObligationPercentage" order="10020.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionLineItems" xlink:to="us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1" order="10030.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureLeasesAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureLeasesAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureLeasesAdditionalInformationDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LesseeFinanceLeaseLeaseNotYetCommencedTermOfContract1" xlink:type="locator" xlink:label="us-gaap_LesseeFinanceLeaseLeaseNotYetCommencedTermOfContract1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LesseeOperatingLeaseLeaseNotYetCommencedTermOfContract1" xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseLeaseNotYetCommencedTermOfContract1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceSheetAmount" xlink:type="locator" xlink:label="us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceSheetAmount" />
    <link:loc xlink:href="msft-20201231.xsd#msft_LesseeOperatingAndFinanceLeasesOptionsToTerminateLeasesTerm" xlink:type="locator" xlink:label="msft_LesseeOperatingAndFinanceLeasesOptionsToTerminateLeasesTerm" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LesseeFinanceLeaseRenewalTerm1" xlink:type="locator" xlink:label="us-gaap_LesseeFinanceLeaseRenewalTerm1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LesseeOperatingLeaseRenewalTerm" xlink:type="locator" xlink:label="us-gaap_LesseeOperatingLeaseRenewalTerm" />
    <link:loc xlink:href="msft-20201231.xsd#msft_LesseeOperatingAndFinanceLeasesRemainingLeaseTerm" xlink:type="locator" xlink:label="msft_LesseeOperatingAndFinanceLeasesRemainingLeaseTerm" />
    <link:loc xlink:href="msft-20201231.xsd#msft_FinanceLeaseMember" xlink:type="locator" xlink:label="msft_FinanceLeaseMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_OperatingLeaseMember" xlink:type="locator" xlink:label="msft_OperatingLeaseMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LeaseContractualTermDomain" xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LeaseContractualTermDomain" xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LeaseContractualTermAxis" xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MaximumMember" xlink:type="locator" xlink:label="srt_MaximumMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_MinimumMember" xlink:type="locator" xlink:label="srt_MinimumMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeMember" xlink:type="locator" xlink:label="srt_RangeMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_RangeAxis" xlink:type="locator" xlink:label="srt_RangeAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_LeasesTable" xlink:type="locator" xlink:label="msft_LeasesTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_LeasesLineItems" xlink:type="locator" xlink:label="msft_LeasesLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_LeasesLineItems" xlink:to="msft_LeasesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_LeasesTable" xlink:to="srt_RangeAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_RangeAxis" xlink:to="srt_RangeMember" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MinimumMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_RangeMember" xlink:to="srt_MaximumMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_LeasesTable" xlink:to="us-gaap_LeaseContractualTermAxis" order="10260.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_LeaseContractualTermAxis" xlink:to="us-gaap_LeaseContractualTermDomain_2" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_LeaseContractualTermAxis" xlink:to="us-gaap_LeaseContractualTermDomain" order="10290.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeaseContractualTermDomain" xlink:to="msft_OperatingLeaseMember" order="10310.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeaseContractualTermDomain" xlink:to="msft_FinanceLeaseMember" order="10330.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="msft_LesseeOperatingAndFinanceLeasesRemainingLeaseTerm" order="10360.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="us-gaap_LesseeOperatingLeaseRenewalTerm" order="10400.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="us-gaap_LesseeFinanceLeaseRenewalTerm1" order="10420.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="msft_LesseeOperatingAndFinanceLeasesOptionsToTerminateLeasesTerm" order="10440.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="us-gaap_UnrecordedUnconditionalPurchaseObligationBalanceSheetAmount" order="10490.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="us-gaap_LesseeOperatingLeaseLeaseNotYetCommencedTermOfContract1" order="10650.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="us-gaap_LesseeFinanceLeaseLeaseNotYetCommencedTermOfContract1" order="10730.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSupplementalBalanceSheetInformationRelatedToLeasesDetail" xlink:href="msft-20201231.xsd#Role_DisclosureSupplementalBalanceSheetInformationRelatedToLeasesDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSupplementalBalanceSheetInformationRelatedToLeasesDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" xlink:type="locator" xlink:label="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" xlink:type="locator" xlink:label="us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" />
    <link:loc xlink:href="msft-20201231.xsd#msft_WeightedAverageDiscountRateAbstract" xlink:type="locator" xlink:label="msft_WeightedAverageDiscountRateAbstract" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FinanceLeaseWeightedAverageRemainingLeaseTerm1" xlink:type="locator" xlink:label="us-gaap_FinanceLeaseWeightedAverageRemainingLeaseTerm1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" xlink:type="locator" xlink:label="us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" />
    <link:loc xlink:href="msft-20201231.xsd#msft_WeightedAverageRemainingLeaseTermAbstract" xlink:type="locator" xlink:label="msft_WeightedAverageRemainingLeaseTermAbstract" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_FinanceLeaseLiability" xlink:type="locator" xlink:label="us-gaap_FinanceLeaseLiability" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentNet" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:type="locator" xlink:label="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:type="locator" xlink:label="us-gaap_PropertyPlantAndEquipmentGross" />
    <link:loc xlink:href="msft-20201231.xsd#msft_FinanceLeaseAbstract" xlink:type="locator" xlink:label="msft_FinanceLeaseAbstract" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingLeaseLiability" xlink:type="locator" xlink:label="us-gaap_OperatingLeaseLiability" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingLeaseRightOfUseAsset" xlink:type="locator" xlink:label="us-gaap_OperatingLeaseRightOfUseAsset" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LeasesOperatingAbstract" xlink:type="locator" xlink:label="us-gaap_LeasesOperatingAbstract" />
    <link:loc xlink:href="msft-20201231.xsd#msft_FinanceLeaseMember" xlink:type="locator" xlink:label="msft_FinanceLeaseMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LeaseContractualTermDomain" xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_LeaseContractualTermAxis" xlink:type="locator" xlink:label="us-gaap_LeaseContractualTermAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherNoncurrentLiabilitiesMember" xlink:type="locator" xlink:label="us-gaap_OtherNoncurrentLiabilitiesMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_OperatingLeaseLiabilitiesMember" xlink:type="locator" xlink:label="msft_OperatingLeaseLiabilitiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherCurrentLiabilitiesMember" xlink:type="locator" xlink:label="us-gaap_OtherCurrentLiabilitiesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BalanceSheetLocationDomain" xlink:type="locator" xlink:label="us-gaap_BalanceSheetLocationDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_BalanceSheetLocationAxis" xlink:type="locator" xlink:label="us-gaap_BalanceSheetLocationAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_LeasesTable" xlink:type="locator" xlink:label="msft_LeasesTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_LeasesLineItems" xlink:type="locator" xlink:label="msft_LeasesLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_LeasesLineItems" xlink:to="msft_LeasesTable" order="10030.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_LeasesTable" xlink:to="us-gaap_BalanceSheetLocationAxis" order="10060.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_BalanceSheetLocationAxis" xlink:to="us-gaap_BalanceSheetLocationDomain" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="us-gaap_OtherCurrentLiabilitiesMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="msft_OperatingLeaseLiabilitiesMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_BalanceSheetLocationDomain" xlink:to="us-gaap_OtherNoncurrentLiabilitiesMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_LeasesTable" xlink:to="us-gaap_LeaseContractualTermAxis" order="10180.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_LeaseContractualTermAxis" xlink:to="us-gaap_LeaseContractualTermDomain" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeaseContractualTermDomain" xlink:to="msft_FinanceLeaseMember" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="us-gaap_LeasesOperatingAbstract" order="10320.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesOperatingAbstract" xlink:to="us-gaap_OperatingLeaseRightOfUseAsset" order="10400.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_LeasesOperatingAbstract" xlink:to="us-gaap_OperatingLeaseLiability" order="10440.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="msft_FinanceLeaseAbstract" order="10560.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_FinanceLeaseAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentGross" order="10640.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_FinanceLeaseAbstract" xlink:to="us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" order="10680.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_FinanceLeaseAbstract" xlink:to="us-gaap_PropertyPlantAndEquipmentNet" order="10720.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_FinanceLeaseAbstract" xlink:to="us-gaap_FinanceLeaseLiability" order="10760.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="msft_WeightedAverageRemainingLeaseTermAbstract" order="10880.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_WeightedAverageRemainingLeaseTermAbstract" xlink:to="us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1" order="10960.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_WeightedAverageRemainingLeaseTermAbstract" xlink:to="us-gaap_FinanceLeaseWeightedAverageRemainingLeaseTerm1" order="11000.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_LeasesLineItems" xlink:to="msft_WeightedAverageDiscountRateAbstract" order="11040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_WeightedAverageDiscountRateAbstract" xlink:to="us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent" order="11120.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_WeightedAverageDiscountRateAbstract" xlink:to="us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent" order="11160.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureStockholdersEquityAdditionalInformationDetail" xlink:href="msft-20201231.xsd#Role_DisclosureStockholdersEquityAdditionalInformationDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureStockholdersEquityAdditionalInformationDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" xlink:type="locator" xlink:label="us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1" xlink:type="locator" xlink:label="us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockRepurchaseProgramAuthorizedAmount1" xlink:type="locator" xlink:label="us-gaap_StockRepurchaseProgramAuthorizedAmount1" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchaseProgramTwentyNineteenMember" xlink:type="locator" xlink:label="msft_ShareRepurchaseProgramTwentyNineteenMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchaseProgramTwentySixteenMember" xlink:type="locator" xlink:label="msft_ShareRepurchaseProgramTwentySixteenMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain" xlink:type="locator" xlink:label="us-gaap_ShareRepurchaseProgramDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain" xlink:type="locator" xlink:label="us-gaap_ShareRepurchaseProgramDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShareRepurchaseProgramAxis" xlink:type="locator" xlink:label="us-gaap_ShareRepurchaseProgramAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchasesTable" xlink:type="locator" xlink:label="msft_ShareRepurchasesTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchasesLineItems" xlink:type="locator" xlink:label="msft_ShareRepurchasesLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_ShareRepurchasesLineItems" xlink:to="msft_ShareRepurchasesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_ShareRepurchasesTable" xlink:to="us-gaap_ShareRepurchaseProgramAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="us-gaap_ShareRepurchaseProgramAxis" xlink:to="us-gaap_ShareRepurchaseProgramDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ShareRepurchaseProgramAxis" xlink:to="us-gaap_ShareRepurchaseProgramDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareRepurchaseProgramDomain" xlink:to="msft_ShareRepurchaseProgramTwentySixteenMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareRepurchaseProgramDomain" xlink:to="msft_ShareRepurchaseProgramTwentyNineteenMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ShareRepurchasesLineItems" xlink:to="us-gaap_StockRepurchaseProgramAuthorizedAmount1" order="10220.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ShareRepurchasesLineItems" xlink:to="us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1" order="10290.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ShareRepurchasesLineItems" xlink:to="us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" order="10360.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureShareRepurchasesDetail" xlink:href="msft-20201231.xsd#Role_DisclosureShareRepurchasesDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureShareRepurchasesDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockRepurchasedDuringPeriodValue" xlink:type="locator" xlink:label="us-gaap_StockRepurchasedDuringPeriodValue" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockRepurchasedDuringPeriodShares" xlink:type="locator" xlink:label="us-gaap_StockRepurchasedDuringPeriodShares" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchaseProgramTwentySixteenMember" xlink:type="locator" xlink:label="msft_ShareRepurchaseProgramTwentySixteenMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchaseProgramTwentyNineteenMember" xlink:type="locator" xlink:label="msft_ShareRepurchaseProgramTwentyNineteenMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShareRepurchaseProgramDomain" xlink:type="locator" xlink:label="us-gaap_ShareRepurchaseProgramDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ShareRepurchaseProgramAxis" xlink:type="locator" xlink:label="us-gaap_ShareRepurchaseProgramAxis" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchasesTable" xlink:type="locator" xlink:label="msft_ShareRepurchasesTable" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ShareRepurchasesLineItems" xlink:type="locator" xlink:label="msft_ShareRepurchasesLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="msft_ShareRepurchasesLineItems" xlink:to="msft_ShareRepurchasesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="msft_ShareRepurchasesTable" xlink:to="us-gaap_ShareRepurchaseProgramAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_ShareRepurchaseProgramAxis" xlink:to="us-gaap_ShareRepurchaseProgramDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareRepurchaseProgramDomain" xlink:to="msft_ShareRepurchaseProgramTwentyNineteenMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_ShareRepurchaseProgramDomain" xlink:to="msft_ShareRepurchaseProgramTwentySixteenMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ShareRepurchasesLineItems" xlink:to="us-gaap_StockRepurchasedDuringPeriodShares" order="10180.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ShareRepurchasesLineItems" xlink:to="us-gaap_StockRepurchasedDuringPeriodValue" order="10240.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentDetail" xlink:href="msft-20201231.xsd#Role_DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ReclassificationFromAociCurrentPeriodNetOfTaxAttributableToParent" xlink:type="locator" xlink:label="us-gaap_ReclassificationFromAociCurrentPeriodNetOfTaxAttributableToParent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ReclassificationFromAociCurrentPeriodTax" xlink:type="locator" xlink:label="us-gaap_ReclassificationFromAociCurrentPeriodTax" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ReclassificationFromAociCurrentPeriodBeforeTaxAttributableToParent" xlink:type="locator" xlink:label="us-gaap_ReclassificationFromAociCurrentPeriodBeforeTaxAttributableToParent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OciBeforeReclassificationsNetOfTaxAttributableToParent" xlink:type="locator" xlink:label="us-gaap_OciBeforeReclassificationsNetOfTaxAttributableToParent" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccountingStandardsUpdateExtensibleList" xlink:type="locator" xlink:label="us-gaap_AccountingStandardsUpdateExtensibleList" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StockholdersEquity" xlink:type="locator" xlink:label="us-gaap_StockholdersEquity" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember" xlink:type="locator" xlink:label="srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_CumulativeEffectPeriodOfAdoptionDomain" xlink:type="locator" xlink:label="srt_CumulativeEffectPeriodOfAdoptionDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_CumulativeEffectPeriodOfAdoptionAxis" xlink:type="locator" xlink:label="srt_CumulativeEffectPeriodOfAdoptionAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NonoperatingIncomeExpenseMember" xlink:type="locator" xlink:label="us-gaap_NonoperatingIncomeExpenseMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SalesMember" xlink:type="locator" xlink:label="us-gaap_SalesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:type="locator" xlink:label="us-gaap_IncomeStatementLocationAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_AccumulatedTranslationAdjustmentAndOtherMember" xlink:type="locator" xlink:label="msft_AccumulatedTranslationAdjustmentAndOtherMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember" xlink:type="locator" xlink:label="us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember" xlink:type="locator" xlink:label="us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain" xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:type="locator" xlink:label="us-gaap_StatementEquityComponentsAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" order="10050.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" xlink:to="us-gaap_StatementEquityComponentsAxis" order="10080.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember" order="10270.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="msft_AccumulatedTranslationAdjustmentAndOtherMember" order="10430.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeMember" order="10490.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" xlink:to="us-gaap_IncomeStatementLocationAxis" order="10500.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_IncomeStatementLocationAxis" xlink:to="us-gaap_IncomeStatementLocationDomain" order="10530.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_SalesMember" order="10550.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_IncomeStatementLocationDomain" xlink:to="us-gaap_NonoperatingIncomeExpenseMember" order="10570.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" xlink:to="srt_CumulativeEffectPeriodOfAdoptionAxis" order="10580.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_CumulativeEffectPeriodOfAdoptionAxis" xlink:to="srt_CumulativeEffectPeriodOfAdoptionDomain" order="10610.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_CumulativeEffectPeriodOfAdoptionDomain" xlink:to="srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember" order="10630.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_StockholdersEquity" order="10680.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_AccountingStandardsUpdateExtensibleList" order="10760.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_OciBeforeReclassificationsNetOfTaxAttributableToParent" order="10840.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_ReclassificationFromAociCurrentPeriodBeforeTaxAttributableToParent" order="10920.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_ReclassificationFromAociCurrentPeriodTax" order="11000.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_ReclassificationFromAociCurrentPeriodNetOfTaxAttributableToParent" order="11080.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" order="11160.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentParentheticalDetail" xlink:href="msft-20201231.xsd#Role_DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentParentheticalDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSummaryOfChangesInAccumulatedOtherComprehensiveIncomeLossByComponentParentheticalDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossTaxPortionAttributableToParent1" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossTaxPortionAttributableToParent1" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax" xlink:type="locator" xlink:label="us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax" />
    <link:loc xlink:href="msft-20201231.xsd#msft_AccumulatedTranslationAdjustmentAndOtherMember" xlink:type="locator" xlink:label="msft_AccumulatedTranslationAdjustmentAndOtherMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember" xlink:type="locator" xlink:label="us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember" xlink:type="locator" xlink:label="us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EquityComponentDomain" xlink:type="locator" xlink:label="us-gaap_EquityComponentDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:type="locator" xlink:label="us-gaap_StatementEquityComponentsAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:type="locator" xlink:label="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossTable" xlink:to="us-gaap_StatementEquityComponentsAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementEquityComponentsAxis" xlink:to="us-gaap_EquityComponentDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AccumulatedGainLossNetCashFlowHedgeParentMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EquityComponentDomain" xlink:to="msft_AccumulatedTranslationAdjustmentAndOtherMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_OtherComprehensiveIncomeLossBeforeReclassificationsTax" order="10200.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems" xlink:to="us-gaap_OtherComprehensiveIncomeLossTaxPortionAttributableToParent1" order="10360.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSegmentRevenueDetail" xlink:href="msft-20201231.xsd#Role_DisclosureSegmentRevenueDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureSegmentRevenueDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" />
    <link:loc xlink:href="msft-20201231.xsd#msft_MorePersonalComputingMember" xlink:type="locator" xlink:label="msft_MorePersonalComputingMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IntelligentCloudMember" xlink:type="locator" xlink:label="msft_IntelligentCloudMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ProductivityAndBusinessProcessesMember" xlink:type="locator" xlink:label="msft_ProductivityAndBusinessProcessesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain" xlink:type="locator" xlink:label="us-gaap_SegmentDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_ProductivityAndBusinessProcessesMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_IntelligentCloudMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_MorePersonalComputingMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" order="10160.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureOperatingIncomeLossBySegmentDetail" xlink:href="msft-20201231.xsd#Role_DisclosureOperatingIncomeLossBySegmentDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureOperatingIncomeLossBySegmentDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_OperatingIncomeLoss" xlink:type="locator" xlink:label="us-gaap_OperatingIncomeLoss" />
    <link:loc xlink:href="msft-20201231.xsd#msft_MorePersonalComputingMember" xlink:type="locator" xlink:label="msft_MorePersonalComputingMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_IntelligentCloudMember" xlink:type="locator" xlink:label="msft_IntelligentCloudMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ProductivityAndBusinessProcessesMember" xlink:type="locator" xlink:label="msft_ProductivityAndBusinessProcessesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentDomain" xlink:type="locator" xlink:label="us-gaap_SegmentDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_StatementBusinessSegmentsAxis" xlink:type="locator" xlink:label="us-gaap_StatementBusinessSegmentsAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_SegmentReportingInformationLineItems" xlink:type="locator" xlink:label="us-gaap_SegmentReportingInformationLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable" xlink:to="us-gaap_StatementBusinessSegmentsAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="us-gaap_StatementBusinessSegmentsAxis" xlink:to="us-gaap_SegmentDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_ProductivityAndBusinessProcessesMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_IntelligentCloudMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentDomain" xlink:to="msft_MorePersonalComputingMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_SegmentReportingInformationLineItems" xlink:to="us-gaap_OperatingIncomeLoss" order="10160.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureRevenueClassifiedByMajorGeographicAreasDetail" xlink:href="msft-20201231.xsd#Role_DisclosureRevenueClassifiedByMajorGeographicAreasDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureRevenueClassifiedByMajorGeographicAreasDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_NonUsMember" xlink:type="locator" xlink:label="us-gaap_NonUsMember" />
    <link:loc xlink:href="https://xbrl.sec.gov/country/2020/country-2020-01-31.xsd#country_US" xlink:type="locator" xlink:label="country_US" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_SegmentGeographicalDomain" xlink:type="locator" xlink:label="srt_SegmentGeographicalDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_SegmentGeographicalDomain" xlink:type="locator" xlink:label="srt_SegmentGeographicalDomain_2" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_StatementGeographicalAxis" xlink:type="locator" xlink:label="srt_StatementGeographicalAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems" xlink:type="locator" xlink:label="us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems" xlink:to="us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfRevenuesFromExternalCustomersAndLongLivedAssetsTable" xlink:to="srt_StatementGeographicalAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="srt_StatementGeographicalAxis" xlink:to="srt_SegmentGeographicalDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_StatementGeographicalAxis" xlink:to="srt_SegmentGeographicalDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_SegmentGeographicalDomain" xlink:to="country_US" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_SegmentGeographicalDomain" xlink:to="us-gaap_NonUsMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_RevenuesFromExternalCustomersAndLongLivedAssetsLineItems" xlink:to="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" order="10140.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsDetail" xlink:href="msft-20201231.xsd#Role_DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" />
    <link:loc xlink:href="msft-20201231.xsd#msft_OtherProductsAndServicesMember" xlink:type="locator" xlink:label="msft_OtherProductsAndServicesMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_EnterpriseServicesMember" xlink:type="locator" xlink:label="msft_EnterpriseServicesMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_DevicesMember" xlink:type="locator" xlink:label="msft_DevicesMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_SearchAdvertisingMember" xlink:type="locator" xlink:label="msft_SearchAdvertisingMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_LinkedInCorporationMember" xlink:type="locator" xlink:label="msft_LinkedInCorporationMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_GamingMember" xlink:type="locator" xlink:label="msft_GamingMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_WindowsMember" xlink:type="locator" xlink:label="msft_WindowsMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_OfficeProductsAndCloudServicesMember" xlink:type="locator" xlink:label="msft_OfficeProductsAndCloudServicesMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ServerProductsAndCloudServicesMember" xlink:type="locator" xlink:label="msft_ServerProductsAndCloudServicesMember" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ProductsAndServicesDomain" xlink:type="locator" xlink:label="srt_ProductsAndServicesDomain" />
    <link:loc xlink:href="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd#srt_ProductOrServiceAxis" xlink:type="locator" xlink:label="srt_ProductOrServiceAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:type="locator" xlink:label="us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:to="us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" xlink:to="srt_ProductOrServiceAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="srt_ProductOrServiceAxis" xlink:to="srt_ProductsAndServicesDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_ServerProductsAndCloudServicesMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_OfficeProductsAndCloudServicesMember" order="10110.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_WindowsMember" order="10130.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_GamingMember" order="10150.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_LinkedInCorporationMember" order="10170.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_SearchAdvertisingMember" order="10190.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_DevicesMember" order="10210.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_EnterpriseServicesMember" order="10230.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="srt_ProductsAndServicesDomain" xlink:to="msft_OtherProductsAndServicesMember" order="10250.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:to="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" order="10280.00" priority="2" use="optional" />
  </link:definitionLink>
  <link:roleRef roleURI="http://www.microsoft.com/20201231/taxonomy/role/DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsParentheticalDetail" xlink:href="msft-20201231.xsd#Role_DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsParentheticalDetail" xlink:type="simple" />
  <link:definitionLink xlink:type="extended" xlink:role="http://www.microsoft.com/20201231/taxonomy/role/DisclosureRevenueClassifiedBySignificantProductAndServiceOfferingsParentheticalDetail">
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" xlink:type="locator" xlink:label="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" />
    <link:loc xlink:href="msft-20201231.xsd#msft_CommercialCloudMember" xlink:type="locator" xlink:label="msft_CommercialCloudMember" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ProductsOrServicesNameSecondaryCategorizationDomain" xlink:type="locator" xlink:label="msft_ProductsOrServicesNameSecondaryCategorizationDomain" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ProductsOrServicesNameSecondaryCategorizationDomain" xlink:type="locator" xlink:label="msft_ProductsOrServicesNameSecondaryCategorizationDomain_2" />
    <link:loc xlink:href="msft-20201231.xsd#msft_ProductsOrServicesSecondaryCategorizationAxis" xlink:type="locator" xlink:label="msft_ProductsOrServicesSecondaryCategorizationAxis" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" xlink:type="locator" xlink:label="us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" />
    <link:loc xlink:href="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd#us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:type="locator" xlink:label="us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:to="us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" order="10010.00" priority="2" use="optional" xbrldt:contextElement="segment" xbrldt:closed="true" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="us-gaap_ScheduleOfEntityWideInformationRevenueFromExternalCustomersByProductsAndServicesTable" xlink:to="msft_ProductsOrServicesSecondaryCategorizationAxis" order="10040.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="msft_ProductsOrServicesSecondaryCategorizationAxis" xlink:to="msft_ProductsOrServicesNameSecondaryCategorizationDomain_2" order="10050.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="msft_ProductsOrServicesSecondaryCategorizationAxis" xlink:to="msft_ProductsOrServicesNameSecondaryCategorizationDomain" order="10070.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="msft_ProductsOrServicesNameSecondaryCategorizationDomain" xlink:to="msft_CommercialCloudMember" order="10090.00" priority="2" use="optional" />
    <link:definitionArc xlink:type="arc" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="us-gaap_EntityWideInformationRevenueFromExternalCustomerLineItems" xlink:to="us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax" order="10120.00" priority="2" use="optional" />
  </link:definitionLink>
</link:linkbase>
