Giter Club home page Giter Club logo

Comments (3)

Xentraxx avatar Xentraxx commented on June 5, 2024 1

The cause of this error seems to be, that some Tokens (got mine with the MSAL.PS module) can't be processed properly by the module and result in this error. If I invoke the request myself it works fine.
This is the solution in case you have the same problem:

Invoke-RestMethod -Uri https://graph.microsoft.com/v1.0/invitations -Method POST -UseBasicParsing -Body "{`"invitedUserEmailAddress`":`"$email`",`"inviteRedirectUrl`":`"$redirectUrl`", `"invitedUserDisplayName`":`"$lastname, $firstname`"}" -Headers @{"Authorization"="Bearer $($token.Accesstoken)"}

from azure-activedirectory-powershell.

Xentraxx avatar Xentraxx commented on June 5, 2024

I also reported this issue here: https://feedback.azure.com/forums/598699-azure-cloud-shell/suggestions/42345556-please-resolve-error-in-new-azureadmsinvitation
If anyone else has also problems with it, feel free to upvote.

from azure-activedirectory-powershell.

robey-ms avatar robey-ms commented on June 5, 2024

+1 hitting this running under an SPN from an ADO pipeline. Thanks for the hint on the token.

Edit:
Looks like this was a bad implementation on my end. I needed to pass both the AaDAccess token and the MSAccessToken to Connect-AzureAD. There are a number of bad implementations that come up in web searches.

from azure-activedirectory-powershell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.